Fungeoneer

Chapter 7: Ledger Lines

You have entered the seventh dungeon. You stand at the bottom of the staircase where you entered, facing east. A gnome sits on the bottom stair, sipping from a flask of mushroom brew. As he looks up at you, then down at the purse of stacking on your belt, you recognize him as the cartographer from the first dungeon. He leans forward, as if about to speak. With a magic marker and a flick of the wrist, he scribbles an S-shaped line of credit onto your purse. He pauses for a moment, then sits back, taking another sip.

The purse of stacking now tracks the stack size as register S. The stack size is initially zero, indicating an empty stack. Stack slots are indexed from zero. Pushing writes a number to slot S, then increments register S. Popping decrements register S, then reads a number from slot S. As before, popping an empty stack raises an error.

With your affairs in order, you consult the map:

[[][[]][][][]]][[][][[][]][[[[[]]][[]][[[]][[[][][[[]]]][][]]]]][]][[[[][][[[][]
[[[.....................QNc]][][]][]]]][][[[][]]]]][[][][eYZze5aWb\jdg4axUej5]]]
[][.....................K[I]Hieb8BOIox-k7:kkwqHJa]][]]][[g.../.....B........1]][
][]....................>E[2\TuwQMV]..=kZKFjsHOe>n........=hcHs[....y........b]]]
[]]....................Ay[[]3vhnasT-]xo2fbSwvugJ=]]]]][[]..........V>gi90\Dhn]]]
]]].[[]]][[[]]]][][]][[[[][][[[[][.][]][[]][]][]][[][[[[[]]][[][]]]a[][[][][]][]
]][...]][[][]]][]][[][[[[[[][][][]..][[[][]]][[[]]]]]][[][]]][eEIJ\+[][][][][][[
[][]].]]][][[[[][[]]]]][][][][[[[][.][]][[[[[[[][][][[][[[[]][%[][]]][[][[[[]][[
]YF1509O9cZ3svsQ>4s+]+][][]]][[[[]....g>=+LNs+jUm3Mle/].......7....][][][][][]]]
[Ej0+FZeeLyNY>.....>.C[]][[[][[]]]....B............M]\........Y....]]][[[[]][[][
]HYYA7/x<wNeblz7ve7ChD[[[[X*/owc-Gz0QAk>HU4GqkUc_3]_[][.......k....[]]]]][[[[[[[
[[......]71%E2a:11djSGkBhi4[]][[]]...]:7y175qwlBOV.3[]].......M....][[[]]][[]][[
[]][[][]]][[[[][]]][]W[][]]][]]]][][][]][[[][[[[[][n]][[[[]][[z[[]]]][][[]]]]][]
]]]][[][][][][[][][[Ye][[[[]]][]]]z2+Ze6Xf-Cf7KsOX6f[[]][]][[]+k[]]]][[][]]][[[]
[]]][[[[[][]]]]][[[]L][[[]]][]]][[O]][][][[[][[[[[[][[[[][]]]]]H][]]]]]][[[][][[
[[[[[[[[[[[[]]][][][0[]]]]]]]Zh2Sc>I8;,:D5:s7wOkBF*]][[[][]][[]l[][[[][[[[][]]]]
]]][[[[[>.........v>c[][]]]][4WyyIF*we7TaA7Zk+_ZKhST9M[[*CKz10D:Z;ac0y00e,62Q][[
]]][[]]]=CdSv_b:0ql[e][]]]IcIy5\4i+T_I37t:CxJ/AndsC][7]]q>....]/J=..........c][[
][][][][,I+9qEgxu3uzoS7k3U+[]6....................G[]XgvvmU80\I=]ZK0\;1hFXt4L]][
][[]][[[[]][][]][[][]][][][[]]][][]][][]][[][]][[[[[[[[][][[]]]][[[[][[][][]][[[

][][]]][[][][[]][[[]]]][[[]]][][[[[[[]]][]]][]][[][][[[[[[]]][[[][[[[[]]][][[[]]
][[][[]][[][[[[[]][]]][[[]]][[[[]]][[][C;xqcKHj]...[[[]]][[[]][[]]]][]][]]][]]][
]][bq*eyKtXg*lMVGOh/01j_][yy*uu=%Oi4023GOoXo28t6+cLK\0][[[[[][[..............[][
[]]l...................<]]n[][]][][[][[i.L..B.><jy.]]s[]]]][][]..............]][
][]h6,J:6%d2oywMOVUHNqFv5-*]][[[[[]]][]_7\[]Em+yKkL[]lEQomOxY.4>jLo%<....>...]]]
[[]][[[[[][[]][[[].][[][[]][[][[[]]][[[[]][.][[[][][]]][[][[[[][[[]]]][][v[]]][[
[]]]][[[[[[........][[[[]]][[][[]][[]][[]]]......[[][][[]][]]][[JVskkKxxX+]]]][[
][]][][[]]].[][[]]]]]]]]]][[]][][[[[[[[]]][[]][[.][[]]]]]]][[][]:[]]]][][]][[][]
[,kDdLy-7c>YmlwQ<Ex>qWe]][][]]][[][[buv<l_;EGZJ/*e+][][][]][[0kkD>.......][]]]]]
]x.M........[<=....<.[d][]..........6.............B........../..D........[][[]][
[x[WA3BoMuXfe]BHLav8un/[][.[[]]][[][N3V<;1._Vh6amN7]]][]][]]]l4N3sAgWwJie][]]]][
[2]N........=-v*AeUK]ne....[[]]][[[[[]]]]][[[][][[][[[]]]][[][][[]][.][]]]]][[][
]2]]][[[][[[]]]]][[][[][][[[]]]][][]]]]]]][[[[[][].[[]]][]][]][[[[[].]]][]][[][]
]cdlQ%Io2_][[[]][][[[]][][][[[]]]]]][[[[[]]].......]][[[[[]][[]]]....[[[][[][[[]
[[[]][]]]0]][][[[][]][[][]][][[][[]][[[]][[[.][[[][[[]]][]][]]][].[][[[][[][[[[[
][[[][[]5I8XCdS_nx\5c%Cf][][]][5TF<IX.s]:xGGV7-Q>V][[][]]FW0VmBF:\uuwVsGNZ][]]][
[][[][[]<=1/o0k2CB><y]>A[]7_StxZYv7]..%XdlhJBshHFf[[[s4+sG2K[.............][[[[]
]]]]]][]xX82LUN+.nfHt*8J2N0[][[v..=[..[]tvX03Ijle=]][d[]]<Oh2Cq7XNjc>....:]][[[]
]][][][]]]]]]]]]]][[[[[][]]][][w.+AxOB8OsKi.6Ki*H54m,7[[]CzueaC1D3EuDGF23M[]][[]
]]]]][[[[][]][[]]][][][]][][][][[[[]]][]][[[]]][[[[]]][][][][]]]][][]][[]][[][]]

[][]][][[]][[[[[[[][[[[[[][]]]][[[[][][[[][]]][[]]][[]]]]][[[][[][][[[[[]]]][][]
[][VI:.fl%:=WC*ik0QOBM4G5][]][]][[[[[[[][][]][]][]][][[][xGc3=UZ=\X-5NN=.9][[[]]
[[[b9Ykcba6tU3II\:8+awHHMts[wmlm/t;44m=yc5.]vBtsj][]]]][[i.............>.G[][[[]
[[]n..=k2DFJ>........>>.s]FTtQFUwGs4m:>Qv5G*M[<.+[[]]vx_H\kYF/Uv1\-DGwy*Kc[[]][]
][]w.]T0Aw46U>.......]e\l]]]YaYuj5eh:zo_s+h2i>dLVgAN2,[]]20xToX<+Vd9quQC><][[]]]
]]]]]][[[[[]][][.]]]][[]]][]]][]]]]]][]_[[[[][[[][[[][[]]][[[][[][]].[]]]][[][]]
]]][]][]][.......[[[][]]]][]][[]]]]][]qN[[][[][[][][]]]]][]][........][[]]][]][[
[][][[[[][.][[]][[[][]]]][[[]]][][[[[[t][[]][][[][[]][]][[][[.][[][[[]][[[]][[[]
][[[[[[][n<,3h:o+x7<a=L>][[[[]][[[E08S8:ShbE%NqG/2dtZ/[][][[.....<O8N-J6*XoS]]][
][[][]][]0>[,..........O][........V..]fHFUEZB2=Y=[]]].]][][[...............1]]][
[[]]][][]YNj=+C+UkucoMNlE7o]][[[][d6NwnKus4+1EuTC[][[.[][[[]...............W][][
[][[[]]]][[[]][[[[[]][[2][]]]][]]][]]][[]]6[][[][]]]]..=1iQdBO>763l34A4ytQWI]]]]
[[]][][[[][[[[[][]][][[6[][]]]][]][]]][[[]1[[]]][]]]]][]][]][[]]][]][]][[[.][][[
]][][[[]][KU\D2a-8KZeiWS][[[[][][[[[[[][]]su9[]][[]][[]][][]]]][[[[][]][]..][][[
][[[[[]][]Y[[][][][[[]]]][[[][]][[][[[[[]]][W][][][[]][]]]]][[[[][[[]][]].[[[[[]
[[[*+wi%H.ghm8Khyhn9N\h5:1F[]][]][]][c%.2uz_9[..<nk][]][][[[[[][[]]][[[[].][[[[[
][]7>T51hm=.......<]..<[][M[[]]]][][]Hz.j...>hCiF]B[[nu>.lyYOf3k0U5GC3\qvZ]>Z.]]
][]Z>%%z1xQxo*3NfK=...w][]fS1ZqlQB/vTqc]meMK7mO-=..]]N].M...........<cm3D=...u]]
][]duFWJ74XWlJF9beVC*Ym[[[[]][[]][[[[]XYFJ_2vJbsand..q[]E.DltDS4TGn3UUYyY;;YxK]]
]]][][[][[[[[]]]][][[][]]][[[][[]]]][][]]]][[]][]]]]][[[[[[][[[]]][][][][]]][]]]

]]]]][[[][][[][[[][[[][[][[[]]][][][[][[][[[[]]]][[][[]]]]][[[[[[][[][[]]][]][[[
[]][]][[4;v=oX%txL%lQ+v....[]]][[]g*1D-FKZAYWC1]][[[[][[]][][.......M;NIvw]]]]][
[[[[[[]]0>->..........,][].]]]]][[1:ufz2w5UHNgA.......][][[]].......B..<.l[[][[]
][[][[[[+..6<x_0>:.4N<<][]...]QU48_den<B>wZ21>][]]]]]...............Q..a./]][[[]
][[[[]]]GM=Y[<2505lwSe*][[[[][]]]]]*u=k];N2XM<z]][][]][]][][]......]Gs>F<f[[]][[
[[[][]][[.[[][[][[]][[]]][]]][][[[[]]]][[[][].]][][][[][[][[]][][[[].]]]]]]]][[]
[[][].....][[[][]]][[][]]]][]][[[[[]][[]]]]][...]I7]]]][[]][][][[[[[....[]][[[[[
]]]][.[[[]][[][[[]][[][][[[[[][[]]][[[[]]]][[]][]]n]][[[][[[]][]][]]][[.[][[][]]
]-j;q9,m%k3kYdKkEmNz_vq<J][[[OxBQ4Af9gJMhf-x->%Sdq1[]]][[[][[[]]]]][[[].[[[][[]]
[*...=c:YG<..>Z2eCFT\Xjmst0OOemDfqaxZmQKVdDXkg06Hh=][[[]][[[][Jxo_gtXh>F.EhNAH[[
[\..]i>..........>Zbgs/=5[[[]eZ=0EF3mxWXsWhyab8;vbAbWo[[[]][]]M..............Y[[
]0j+aGonLt6,N7z6_%,95qFi6[[[][[]]][][]][.[]]][[[[[[[]sOBO8DL\7<81A\zcQVx5KXEd.[[
][[][[[[[[[]][[][[.][][][]][]][[]]]][[[].][]]]]][[[[][][][]][[][].]][]][[][[[][[
]][]]]]............]]][[[]][[[[[][]......[[[]]][][][[][[]]][]]]]].[]]]]]][[[]][[
[[[][][.[][[][[[][[]][][][][][[]]][.][[[[]]][]][]]]][[][[[]][[]]].][[[][[[[[[[]]
][ai6%-02D1+6QW_][][]][[]]XKnE4\G7vU,%I_>yF;-MDB6cnn+0UJU5n/Mqm7Ci=9%6\bzB+0D]]]
]]C=<..........w[[]]][][]]f[].=QXUgKTK3*v\kz<>m2c]..[[[<aa9azauhUUy-a5bXNIQ<q][]
[]zy<..........>][][]][[]]*[[]yzD7NWkl_u%ufz*9a4>:*4]]]OAfhhVm.tTon_Nl6G1ff]6[[]
[]*DeokJDX1jL_DJ136MTg;zzc/[[[][[][[][[]][[]][[]][]]][[][][][][][[[[]]]][[][[]][
]][]][][[][][[]]]]][][][[]][[[][][[[]][[[]]][]]]][[[[][[]]]]]][]]][[]][[[[]][][[

[][]][[[[][[[[]]]]]][]]][[[[[]]]][][][][][][]]]]]][[[][[][[][[[]][][[]]]]]]]]]][
][][U0yS-cFT>YUYW%5m6C3hVmvhQthGb1=AfU2]ki5ODOFk1>7O.0]]]]][]][4X+.z]...[..][]]]
[][[8.[5k<.<3lFEmtix=..[[[[[[[][L>e>..7.6....[......[U]][[[[][]>>.]v7B8LQUv[][[]
]]][Q..=DX\3/uxi<3xYf6>]]]]][[[]i+LUEv:-<QA.5<[.....]f2vLU74KHy-YqgyDUkD2[M][][[
]][]Y7gS5.iu+b9VNEMd:[-[]][]]][[[[[[[[].][[][][[[][[[[[]]]]]][].....=a<XmCW[[]][
[[[[[][][[]]][.[[[[[[][]]][][][[]]]]]][.[[[[[][[[[]]]]][[]][[][]]]]][]][[.]]][[[
]][[]]]]][[]][..]][[]]][[]]][[][]][.....[[][][[[[[]]]]][]]]]][[]][[[[]]]].][[][[
][]][]]][[][[]].[[[][][][][][][[[]].[]][[[][]]]][][]]]]][[[[[[[[]]]]]][[[.[[]][]
]]8\/7t4DtIqXSxc/mcJEA*G7z*]]][[VDasL18kF4b9.<][]]]][]]][]]][[]]][[]]]][[.]][]][
][vqF0J>N2E1J<[.......[]]]_][[][=iNBk5WE9T>W.9........]].2VKSs3]...>:f<jl*ucv]][
[]U9+]<tOunel1bZd<....][[[B=x8zKt=ZlJ16ZoKE8[:[[]][[[..7w7Ne790U6,s5iTsHn9d=:]]]
[][[]][[[][][[Y]]][[][]][[[]]]][[[.]]]]]]][[[[[[][]][]]9JQ0E2H;[CczCmGdNnSdm2[[]
[[][[[]]][]]][2[[][][[[[][][][]]]].[]]]][]][][[]][[]][[[]j[][[]][[][[[[][][]][[[
[][]][][]][[[]mI[]][][[[[]]][][[[].............1][[][[[]]%xt9iB7j8]][][[[][][[[]
]]][[]]][[][]][w][][[]]]][[[][][][[[[[[[[[]][[[8][][]]][[[]][[]]]9]][[][[[[[[[]]
]][][[hfmvX*X5YJQizI/WfXs=T][[[[4+:nayOe<]Ck3BVw[]][[v7WFD5=7gKbdZf4Hm%AlT]][[][
[[]][[u==a_Jq7kV[...5[]]][hzeGxSy95i>.>=....></f=]...K[]k[,4oQlDwDd5T-Jmm+>][[[[
[[][[]I[.>.....<....=[[[][[]]]]]Nw75ksC8fAj21Z3i<[[][[[]X.=sKM_l1n[......],[]][[
]][[[]K]6560E6lLOetcJ[]]][[[[]][...]Heo7;Zfg_f0[[]][][]]gwkgwW9Hu:*H0x%WZ4X][[]]
]][][]]][[]]]][]][][]][[][[[[[[][]][[][][]]][[]]][]][]]][][][[[[][]][[[[[]]][[]]

][]]]][]][][]]]]][[[[[]][]]]]][][]][]][[]][][[][[[[][[[]]][[]][]]]][[]]][[[[][]]
][;QJLcQ:EZq<.........=Q.]][[[[[]-Nx/K=-I0ZhligZL<[][..],qiVJN.E9fCA6VG>..][[]][
][_.....>h5,FN9lO;%J*1u-H0n][[][]<.<[.T..........A....[]][_>u8o<<w>.......][[][]
]]6vYN\eXF5+2m*fcqVImy<>Y]5[[][]]:L0I._.........._]]][[][[8....H..........]][][]
[[[][][][[[[[][]]]]]]]]]n[sMh,8N2UH4D[GFCyEU2EQMk3[[]][]]]6ZnhawLzUcm6H.zj]][[][
[][][][[[][[][[[]][[][[]K[[[[][[][]o[][[][[[]][[[[[]]][][][.][[[[]]]][]][][[[][]
]][]][]]]][][[[[Z*=K\F23z[[[[]][][]_uMN+92K:]][][[][[[[[]]]...........[[[[]][[[[
]][[[]]][[]][[[]t][]]][]]][]][][][[][[][][]S[]][[][[[]][]][][[[]][]][.[[[[[]]][]
[.....[WhCx.hO[.E........[][[U[33OIkn*iXuHj+3gbCAaB][sa-,\,ykDfLo,vHX-WgkM6ng2:[
]..[jxu<=aa>....T........[5MwouDbM_hIK/>..<d[.....4[[\][]][[[[[[[]]<...........]
[JkaLX,lx_-Fd4%+io>X:YlMfCl[]aAQ/A2qt*:o:0FH7x=:32BTfX[[]]][][[][[]............[
[[][]][]]]][]]][:[]][[][[[]]]D*OQd+v+HM/hxB,f*YLAb3[]][]]][][][[[[[............[
]][[][[]][[][[][h[[[[]][[[]][[[g]]][][]][[[]][]]]]]]][]]]][[]]][]][.][][[]]]]][]
][[]]][]][[[[KZkt[[[[[[][[]]][[IyqlELngN/_48][[][[[]]][]]]][[[]][...]][][][][][]
[]]]]]][[[][[t[]][][]][[][[]][[[[[]][][][][Q[[[]]]]][[[]]]][]]][].[][][]]][]][][
[]][[[[[[5...t.w_2fFnV]][][[][i1T%YZDCuSW60k9S]][[]]]]][o9s8huu=4n+9dcTw+%n]..B]
][][[]]]]IUAVf.L.....c]][]]]].=FTb1><I<....><S]]]][[],-\DQ4CtEc+:mxcLkT]..<...D[
]][]]][[[<...].>.....j[]][AzXmXYk5=9U43gqjfMMufitNSXYh[]*NqiTkV-T16HJE1Y.8%ij4U[
][[]][]][WLKfnB19Q;fA.eOU6I[[[][[][]][[][[[[[][[[]]]]]][[]][[[[[][][[[[][[]][]][
[]]][[[][[]][[[]][]]]]][[]]][]][]][]]]][[][][[[[[[[[][[[][]]]][[][[[]][[[[[[[]][

]]]][]]][][[[[[[]][[[]][[][[]]][]]][][[[][]][[[[[[]]]]]]]][][[]]]][][]][[[]][]]]
[][xQW8-9LAs8+OfQCZyv4w%9\e][[[]]][[...............A][[UW6%ghX;3VfGbtX:<[,wG2]]]
];CyFg4w<.=iMgmnfOkXsd=[.[I[[]][]][[O_4I:g4iYYBsBAo,YA]W[W8<......<E21ezClM]C[]]
[],\.....]kWM/b-F+;:1,O<[[n][][[]]][q..............I]Kljw=...............[].T][]
[]]][[][[[]]]][][]]][]h[[]bnz1AKkC;E-9AW4t.7q3d\Q%Qy[][y\2Aj4HCSfWEsTko2gj,gD[[]
]][][[]]][][[[[][[][]]E][[][]]][[]]][][[[[][[]]][.[]][[[[]]][[[].[]][[[]][[[[]]]
[[[]]][][[[]][eDy.O0\3H[][[[]]][[[[[[[[]]]][[]]]..[][[[[]][[][[[........[][][][]
]][]][[[[[[[[]f]][]]][]]][[[[][[]][[]]]][[[[[][[.][][][[]]][][[]][][][].[[[]][[[
][[][][]][eug\aMn9[V6h]][]][]]][]][][[N63WfKxk-2:T.][*X5fcaU:IF3d07aN+7q=.....]]
]][][[]][]-<B2TUqDt=\MAUs-s]]][][[][[[[<=/I5H9iL2E6]]f[]]]]][.=y8J,M58J]7.....[[
]][[[]][[[.j[fN4=]<UGZ[[[[5]][[]]]][[[..]...y.....][[b[[][[]]]Z\H,:1.7*Qo.....[]
[][]]][]]][[[[].][][]][[]]KI0Vsjjax9WCH3B_t%2SyYM_wMvN[[]][[[][[]]][]]\[][[][]]]
[[[[][]][[[[][[.]][[][[[[][[][[][[[]][]]][[[X[][]][]][[]]]][][[[]][]]]D[][][]][[
[]]]]]][].......[]]][[]][[[]][[]]]]]/WaDkdM%n[[[]]][][]]]][[[[[[][][[fz][]]]][]]
[[[[[[][].]]][[[]][]]]]]]]][[]][[]][A[[]]][[[[[]]]][]]][[]][[[[[]][][o]][][[[[[[
]][]][[[].][[[[[[]][[][][][[[NtmO+TVuHqLHgJ].....6][[[]]]][[][]][[[[]e][]][[[][]
[[gmsTby_L.Zww*DS9_dMmo2jaB[]1.m...<:[....=<.....2[]][[]][[..........M....[[]]]]
]]X............<[[[]]][[]]Bnj71yHJu2SnWJ9wJLf*NgstS5L:[[[][..........x....]]][]]
][2cgIM-%D7-q4b8[[][[[][[[[[]K]Smbjho,;fK=t.2*dsuv[[]VM0asAD/4cY5-8Utc....[[][]]
[[[[]][[[[[]]][[[]][][]][][]]]]][][][[]]]]][]]][[][]]]][[[][[]][][][]]][[][][]][

This dungeon introduces tiles with getters and setters for register S (marked s or S on the map), along with peekers (marked ,) and pokers (marked ;). When you trigger an S-getter tile, read the number from register S, then push that number onto the stack. For an S-setter tile, pop a number from the stack, then write that number to register S. Writing to register S also resizes the stack, shrinking or growing it. Shrinking means popping repeatedly, while growing means repeatedly pushing zero.

For a peeker tile, pop a number a from the stack. Read another number b from slot a. Push b onto the stack. For a poker tile, pop two numbers from the stack: first a, then b. Write b to slot a.

After how many ticks do you leave the dungeon?

From here, you can continue to the answer.

Example

Consider an example dungeon:

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=s03_s<330]....3]
[48\:79S.65s9:297=4[
][[[[]]][[]]][[[][[[

The log below shows you exploring the example dungeon, with your location marked @ on the map. The status lines now also show the stack size as register S (labeled S).

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=s03_s@330]....3]
[48\:79S.65s9:297=4[
][[[[]]][[]]][[[][[[

St: []  Dx: East  Co: (9, 2)  Tk: 0
S: 0

---

You go east. You take 3.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=s03_s<@30]....3]
[48\:79S.65s9:297=4[
][[[[]]][[]]][[[][[[

St: [3]  Dx: East  Co: (10, 2)  Tk: 1
S: 1

---

You go east. You take 3.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=s03_s<3@0]....3]
[48\:79S.65s9:297=4[
][[[[]]][[]]][[[][[[

St: [3, 3]  Dx: East  Co: (11, 2)  Tk: 2
S: 2

---

You go east. You take 0.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=s03_s<33@]....3]
[48\:79S.65s9:297=4[
][[[[]]][[]]][[[][[[

St: [3, 3, 0]  Dx: East  Co: (12, 2)  Tk: 3
S: 3

---

A wall blocks your way east. You turn right.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=s03_s<33@]....3]
[48\:79S.65s9:297=4[
][[[[]]][[]]][[[][[[

St: [3, 3, 0]  Dx: South  Co: (12, 2)  Tk: 4
S: 3

---

You go south. You take 9.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=s03_s<330]....3]
[48\:79S.65s@:297=4[
][[[[]]][[]]][[[][[[

St: [3, 3, 0, 9]  Dx: South  Co: (12, 3)  Tk: 5
S: 4

---

A wall blocks your way south. You turn right.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=s03_s<330]....3]
[48\:79S.65s@:297=4[
][[[[]]][[]]][[[][[[

St: [3, 3, 0, 9]  Dx: West  Co: (12, 3)  Tk: 6
S: 4

---

You go west. You read 4 from register S.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=s03_s<330]....3]
[48\:79S.65@9:297=4[
][[[[]]][[]]][[[][[[

St: [3, 3, 0, 9, 4]  Dx: West  Co: (11, 3)  Tk: 7
S: 5

---

You go west. You take 5.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=s03_s<330]....3]
[48\:79S.6@s9:297=4[
][[[[]]][[]]][[[][[[

St: [3, 3, 0, 9, 4, 5]  Dx: West  Co: (10, 3)  Tk: 8
S: 6

---

You go west. You take 6.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=s03_s<330]....3]
[48\:79S.@5s9:297=4[
][[[[]]][[]]][[[][[[

St: [3, 3, 0, 9, 4, 5, 6]  Dx: West  Co: (9, 3)  Tk: 9
S: 7

---

You go west.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=s03_s<330]....3]
[48\:79S@65s9:297=4[
][[[[]]][[]]][[[][[[

St: [3, 3, 0, 9, 4, 5, 6]  Dx: West  Co: (8, 3)  Tk: 10
S: 7

---

You go west. You write 6 to register S.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=s03_s<330]....3]
[48\:79@.65s9:297=4[
][[[[]]][[]]][[[][[[

St: [3, 3, 0, 9, 4, 5]  Dx: West  Co: (7, 3)  Tk: 11
S: 6

---

You go west. You take 9.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=s03_s<330]....3]
[48\:7@S.65s9:297=4[
][[[[]]][[]]][[[][[[

St: [3, 3, 0, 9, 4, 5, 9]  Dx: West  Co: (6, 3)  Tk: 12
S: 7

---

You go west. You take 7.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=s03_s<330]....3]
[48\:@9S.65s9:297=4[
][[[[]]][[]]][[[][[[

St: [3, 3, 0, 9, 4, 5, 9, 7]  Dx: West  Co: (5, 3)  Tk: 13
S: 8

---

You go west. You duplicate 7.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=s03_s<330]....3]
[48\@79S.65s9:297=4[
][[[[]]][[]]][[[][[[

St: [3, 3, 0, 9, 4, 5, 9, 7, 7]  Dx: West  Co: (4, 3)  Tk: 14
S: 9

---

You go west. You swap 7 and 7.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=s03_s<330]....3]
[48@:79S.65s9:297=4[
][[[[]]][[]]][[[][[[

St: [3, 3, 0, 9, 4, 5, 9, 7, 7]  Dx: West  Co: (3, 3)  Tk: 15
S: 9

---

You go west. You take 8.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=s03_s<330]....3]
[4@\:79S.65s9:297=4[
][[[[]]][[]]][[[][[[

St: [3, 3, 0, 9, 4, 5, 9, 7, 7, 8]  Dx: West  Co: (2, 3)  Tk: 16
S: 10

---

You go west. You take 4.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=s03_s<330]....3]
[@8\:79S.65s9:297=4[
][[[[]]][[]]][[[][[[

St: [3, 3, 0, 9, 4, 5, 9, 7, 7, 8, 4]  Dx: West  Co: (1, 3)  Tk: 17
S: 11

---

A wall blocks your way west. You turn left.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=s03_s<330]....3]
[@8\:79S.65s9:297=4[
][[[[]]][[]]][[[][[[

St: [3, 3, 0, 9, 4, 5, 9, 7, 7, 8, 4]  Dx: South  Co: (1, 3)  Tk: 18
S: 11

---

A wall blocks your way south. You turn left.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=s03_s<330]....3]
[@8\:79S.65s9:297=4[
][[[[]]][[]]][[[][[[

St: [3, 3, 0, 9, 4, 5, 9, 7, 7, 8, 4]  Dx: East  Co: (1, 3)  Tk: 19
S: 11

---

You go east. You take 8.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=s03_s<330]....3]
[4@\:79S.65s9:297=4[
][[[[]]][[]]][[[][[[

St: [3, 3, 0, 9, 4, 5, 9, 7, 7, 8, 4, 8]  Dx: East  Co: (2, 3)  Tk: 20
S: 12

---

You go east. You swap 4 and 8.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=s03_s<330]....3]
[48@:79S.65s9:297=4[
][[[[]]][[]]][[[][[[

St: [3, 3, 0, 9, 4, 5, 9, 7, 7, 8, 8, 4]  Dx: East  Co: (3, 3)  Tk: 21
S: 12

---

You go east. You duplicate 4.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=s03_s<330]....3]
[48\@79S.65s9:297=4[
][[[[]]][[]]][[[][[[

St: [3, 3, 0, 9, 4, 5, 9, 7, 7, 8, 8, 4, 4]  Dx: East  Co: (4, 3)  Tk: 22
S: 13

---

You go east. You take 7.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=s03_s<330]....3]
[48\:@9S.65s9:297=4[
][[[[]]][[]]][[[][[[

St: [3, 3, 0, 9, 4, 5, 9, 7, 7, 8, 8, 4, 4, 7]  Dx: East  Co: (5, 3)  Tk: 23
S: 14

---

You go east. You take 9.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=s03_s<330]....3]
[48\:7@S.65s9:297=4[
][[[[]]][[]]][[[][[[

St: [3, 3, 0, 9, 4, 5, 9, 7, 7, 8, 8, 4, 4, 7, 9]  Dx: East  Co: (6, 3)  Tk: 24
S: 15

---

You go east. You write 9 to register S.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=s03_s<330]....3]
[48\:79@.65s9:297=4[
][[[[]]][[]]][[[][[[

St: [3, 3, 0, 9, 4, 5, 9, 7, 7]  Dx: East  Co: (7, 3)  Tk: 25
S: 9

---

You go east.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=s03_s<330]....3]
[48\:79S@65s9:297=4[
][[[[]]][[]]][[[][[[

St: [3, 3, 0, 9, 4, 5, 9, 7, 7]  Dx: East  Co: (8, 3)  Tk: 26
S: 9

---

You go east. You take 6.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=s03_s<330]....3]
[48\:79S.@5s9:297=4[
][[[[]]][[]]][[[][[[

St: [3, 3, 0, 9, 4, 5, 9, 7, 7, 6]  Dx: East  Co: (9, 3)  Tk: 27
S: 10

---

You go east. You take 5.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=s03_s<330]....3]
[48\:79S.6@s9:297=4[
][[[[]]][[]]][[[][[[

St: [3, 3, 0, 9, 4, 5, 9, 7, 7, 6, 5]  Dx: East  Co: (10, 3)  Tk: 28
S: 11

---

You go east. You read 11 from register S.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=s03_s<330]....3]
[48\:79S.65@9:297=4[
][[[[]]][[]]][[[][[[

St: [3, 3, 0, 9, 4, 5, 9, 7, 7, 6, 5, 11]  Dx: East  Co: (11, 3)  Tk: 29
S: 12

---

You go east. You take 9.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=s03_s<330]....3]
[48\:79S.65s@:297=4[
][[[[]]][[]]][[[][[[

St: [3, 3, 0, 9, 4, 5, 9, 7, 7, 6, 5, 11, 9]  Dx: East  Co: (12, 3)  Tk: 30
S: 13

---

You go east. You duplicate 9.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=s03_s<330]....3]
[48\:79S.65s9@297=4[
][[[[]]][[]]][[[][[[

St: [3, 3, 0, 9, 4, 5, 9, 7, 7, 6, 5, 11, 9, 9]  Dx: East  Co: (13, 3)  Tk: 31
S: 14

---

You go east. You take 2.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=s03_s<330]....3]
[48\:79S.65s9:@97=4[
][[[[]]][[]]][[[][[[

St: [..., 9, 4, 5, 9, 7, 7, 6, 5, 11, 9, 9, 2]  Dx: East  Co: (14, 3)  Tk: 32
S: 15

---

You go east. You take 9.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=s03_s<330]....3]
[48\:79S.65s9:2@7=4[
][[[[]]][[]]][[[][[[

St: [..., 4, 5, 9, 7, 7, 6, 5, 11, 9, 9, 2, 9]  Dx: East  Co: (15, 3)  Tk: 33
S: 16

---

You go east. You take 7.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=s03_s<330]....3]
[48\:79S.65s9:29@=4[
][[[[]]][[]]][[[][[[

St: [..., 5, 9, 7, 7, 6, 5, 11, 9, 9, 2, 9, 7]  Dx: East  Co: (16, 3)  Tk: 34
S: 17

---

You go east. You turn right because 9 > 7.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=s03_s<330]....3]
[48\:79S.65s9:297@4[
][[[[]]][[]]][[[][[[

St: [..., 9, 4, 5, 9, 7, 7, 6, 5, 11, 9, 9, 2]  Dx: South  Co: (17, 3)  Tk: 35
S: 15

---

A wall blocks your way south. You turn left.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=s03_s<330]....3]
[48\:79S.65s9:297@4[
][[[[]]][[]]][[[][[[

St: [..., 9, 4, 5, 9, 7, 7, 6, 5, 11, 9, 9, 2]  Dx: East  Co: (17, 3)  Tk: 36
S: 15

---

You go east. You take 4.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=s03_s<330]....3]
[48\:79S.65s9:297=@[
][[[[]]][[]]][[[][[[

St: [..., 4, 5, 9, 7, 7, 6, 5, 11, 9, 9, 2, 4]  Dx: East  Co: (18, 3)  Tk: 37
S: 16

---

A wall blocks your way east. You turn left.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=s03_s<330]....3]
[48\:79S.65s9:297=@[
][[[[]]][[]]][[[][[[

St: [..., 4, 5, 9, 7, 7, 6, 5, 11, 9, 9, 2, 4]  Dx: North  Co: (18, 3)  Tk: 38
S: 16

---

You go north. You take 3.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=s03_s<330]....@]
[48\:79S.65s9:297=4[
][[[[]]][[]]][[[][[[

St: [..., 5, 9, 7, 7, 6, 5, 11, 9, 9, 2, 4, 3]  Dx: North  Co: (18, 2)  Tk: 39
S: 17

---

You go north. You swap 4 and 3.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;@]
[..=s03_s<330]....3]
[48\:79S.65s9:297=4[
][[[[]]][[]]][[[][[[

St: [..., 5, 9, 7, 7, 6, 5, 11, 9, 9, 2, 3, 4]  Dx: North  Co: (18, 1)  Tk: 40
S: 17

---

A wall blocks your way north. You turn left.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;@]
[..=s03_s<330]....3]
[48\:79S.65s9:297=4[
][[[[]]][[]]][[[][[[

St: [..., 5, 9, 7, 7, 6, 5, 11, 9, 9, 2, 3, 4]  Dx: West  Co: (18, 1)  Tk: 41
S: 17

---

You go west. You write 3 to slot 4.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s@\]
[..=s03_s<330]....3]
[48\:79S.65s9:297=4[
][[[[]]][[]]][[[][[[

St: [..., 9, 3, 5, 9, 7, 7, 6, 5, 11, 9, 9, 2]  Dx: West  Co: (17, 1)  Tk: 42
S: 15

---

You go west. You read 15 from register S.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170@;\]
[..=s03_s<330]....3]
[48\:79S.65s9:297=4[
][[[[]]][[]]][[[][[[

St: [..., 3, 5, 9, 7, 7, 6, 5, 11, 9, 9, 2, 15]  Dx: West  Co: (16, 1)  Tk: 43
S: 16

---

You go west. You take 0.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,17@s;\]
[..=s03_s<330]....3]
[48\:79S.65s9:297=4[
][[[[]]][[]]][[[][[[

St: [..., 5, 9, 7, 7, 6, 5, 11, 9, 9, 2, 15, 0]  Dx: West  Co: (15, 1)  Tk: 44
S: 17

---

You go west. You take 7.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,1@0s;\]
[..=s03_s<330]....3]
[48\:79S.65s9:297=4[
][[[[]]][[]]][[[][[[

St: [..., 9, 7, 7, 6, 5, 11, 9, 9, 2, 15, 0, 7]  Dx: West  Co: (14, 1)  Tk: 45
S: 18

---

You go west. You take 1.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,@70s;\]
[..=s03_s<330]....3]
[48\:79S.65s9:297=4[
][[[[]]][[]]][[[][[[

St: [..., 7, 7, 6, 5, 11, 9, 9, 2, 15, 0, 7, 1]  Dx: West  Co: (13, 1)  Tk: 46
S: 19

---

You go west. You read 3 from slot 1.

[]][[][[]]]]]]]][[[[
[.[7s82162S0@170s;\]
[..=s03_s<330]....3]
[48\:79S.65s9:297=4[
][[[[]]][[]]][[[][[[

St: [..., 7, 7, 6, 5, 11, 9, 9, 2, 15, 0, 7, 3]  Dx: West  Co: (12, 1)  Tk: 47
S: 19

---

You go west. You take 0.

[]][[][[]]]]]]]][[[[
[.[7s82162S@,170s;\]
[..=s03_s<330]....3]
[48\:79S.65s9:297=4[
][[[[]]][[]]][[[][[[

St: [..., 7, 6, 5, 11, 9, 9, 2, 15, 0, 7, 3, 0]  Dx: West  Co: (11, 1)  Tk: 48
S: 20

---

You go west. You write 0 to register S.

[]][[][[]]]]]]]][[[[
[.[7s82162@0,170s;\]
[..=s03_s<330]....3]
[48\:79S.65s9:297=4[
][[[[]]][[]]][[[][[[

St: []  Dx: West  Co: (10, 1)  Tk: 49
S: 0

---

You go west. You take 2.

[]][[][[]]]]]]]][[[[
[.[7s8216@S0,170s;\]
[..=s03_s<330]....3]
[48\:79S.65s9:297=4[
][[[[]]][[]]][[[][[[

St: [2]  Dx: West  Co: (9, 1)  Tk: 50
S: 1

---

You go west. You take 6.

[]][[][[]]]]]]]][[[[
[.[7s821@2S0,170s;\]
[..=s03_s<330]....3]
[48\:79S.65s9:297=4[
][[[[]]][[]]][[[][[[

St: [2, 6]  Dx: West  Co: (8, 1)  Tk: 51
S: 2

---

You go west. You take 1.

[]][[][[]]]]]]]][[[[
[.[7s82@62S0,170s;\]
[..=s03_s<330]....3]
[48\:79S.65s9:297=4[
][[[[]]][[]]][[[][[[

St: [2, 6, 1]  Dx: West  Co: (7, 1)  Tk: 52
S: 3

---

You go west. You take 2.

[]][[][[]]]]]]]][[[[
[.[7s8@162S0,170s;\]
[..=s03_s<330]....3]
[48\:79S.65s9:297=4[
][[[[]]][[]]][[[][[[

St: [2, 6, 1, 2]  Dx: West  Co: (6, 1)  Tk: 53
S: 4

---

You go west. You take 8.

[]][[][[]]]]]]]][[[[
[.[7s@2162S0,170s;\]
[..=s03_s<330]....3]
[48\:79S.65s9:297=4[
][[[[]]][[]]][[[][[[

St: [2, 6, 1, 2, 8]  Dx: West  Co: (5, 1)  Tk: 54
S: 5

---

You go west. You read 5 from register S.

[]][[][[]]]]]]]][[[[
[.[7@82162S0,170s;\]
[..=s03_s<330]....3]
[48\:79S.65s9:297=4[
][[[[]]][[]]][[[][[[

St: [2, 6, 1, 2, 8, 5]  Dx: West  Co: (4, 1)  Tk: 55
S: 6

---

You go west. You take 7.

[]][[][[]]]]]]]][[[[
[.[@s82162S0,170s;\]
[..=s03_s<330]....3]
[48\:79S.65s9:297=4[
][[[[]]][[]]][[[][[[

St: [2, 6, 1, 2, 8, 5, 7]  Dx: West  Co: (3, 1)  Tk: 56
S: 7

---

A wall blocks your way west. You turn left.

[]][[][[]]]]]]]][[[[
[.[@s82162S0,170s;\]
[..=s03_s<330]....3]
[48\:79S.65s9:297=4[
][[[[]]][[]]][[[][[[

St: [2, 6, 1, 2, 8, 5, 7]  Dx: South  Co: (3, 1)  Tk: 57
S: 7

---

You go south. You turn left because 5 < 7.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..@s03_s<330]....3]
[48\:79S.65s9:297=4[
][[[[]]][[]]][[[][[[

St: [2, 6, 1, 2, 8]  Dx: East  Co: (3, 2)  Tk: 58
S: 5

---

You go east. You read 5 from register S.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=@03_s<330]....3]
[48\:79S.65s9:297=4[
][[[[]]][[]]][[[][[[

St: [2, 6, 1, 2, 8, 5]  Dx: East  Co: (4, 2)  Tk: 59
S: 6

---

You go east. You take 0.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=s@3_s<330]....3]
[48\:79S.65s9:297=4[
][[[[]]][[]]][[[][[[

St: [2, 6, 1, 2, 8, 5, 0]  Dx: East  Co: (5, 2)  Tk: 60
S: 7

---

You go east. You take 3.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=s0@_s<330]....3]
[48\:79S.65s9:297=4[
][[[[]]][[]]][[[][[[

St: [2, 6, 1, 2, 8, 5, 0, 3]  Dx: East  Co: (6, 2)  Tk: 61
S: 8

---

You go east. You drop 3.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=s03@s<330]....3]
[48\:79S.65s9:297=4[
][[[[]]][[]]][[[][[[

St: [2, 6, 1, 2, 8, 5, 0]  Dx: East  Co: (7, 2)  Tk: 62
S: 7

---

You go east. You read 7 from register S.

[]][[][[]]]]]]]][[[[
[.[7s82162S0,170s;\]
[..=s03_@<330]....3]
[48\:79S.65s9:297=4[
][[[[]]][[]]][[[][[[

St: [2, 6, 1, 2, 8, 5, 0, 7]  Dx: East  Co: (8, 2)  Tk: 63
S: 8

---

You go east. You go upstairs.

St: [2, 6, 1, 2, 8, 5, 0, 7]  Dx: East  Tk: 64
S: 8

You leave the example dungeon after 64 ticks.