Escape the labyrinth!
Python 2, 64 bytes



def f(n):d=0x1211252b5375&gt;&gt;2*n-4&amp;3;print"nwes"[d];f(n+d*3+d%2-5)


Try it online!

A function that prints one direction per line, terminating with error. 

The constant 0x1211252b5375 encodes in base 4 the direction d we travel from each room number as a number 0 through 3. The extraction digit &gt;&gt;2*n-4&amp;3 is also designed to give a negative shift error when n=1, terminating the code. We update the room number n via an offset that's computed from the direction d as d*3+d%2-5, which maps:

d   d*3+d%2-5
0  -&gt; -5
1  -&gt; -1
2  -&gt;  1
3  -&gt;  5