The method used is to keep to the side of a wall, in my case I kept close to the wall at the right hand, and followed it at every corner. When entering a dead-ended branch, one will eventually exit it coming along the wall at the other side.
The red trace is the total walk ; the blue trace is the shortest path extracted from that.