O="Detouq,htgnel-gnirts,fer-gnirts,fi,!rdc-tes,tsil>-rotcev,!tes-gnirts,enifed,!tes-rotcev,?rotcev,=,cc/llac,!tes,adbmal,rddc,gnirts-ekam,fer-rotcev,htgnel-rotcev,rotcev-ekam,lobmys>-gnirts,gnirts>-lobmys,?erudecorp,!rac-tes,tneitouq,ton,lave,fer-tsil,rdddac,*,?tcejbo-foe,?lobmys,lper,?gnirts,enilwen,rotcev>-tsil,+,etirw,rahc-keep,yalpsid,tsil>-gnirts,daer,gnirts>-tsil,?lauqe,,,,?llun,htgnel,,,,,rddac,rdac,-,,,<,,rac,?riap,,rahc-daer,rdc,,snoc,,?vqe,,,,,;8L!L8L@YJ@YGZ$^8J~YN^YC@PvCvR3y]$7#YS*^z!S*9Bi&:EiS/ai&kkz!S/:kw'k]@'_*Z@aC_G^~F^{!>'^8>YHlbC`^'`~?_G_~F_|]D9C`^Uka_CaG`.ZDdCbAai$G`^~F_|!S+#`kn3^~i$#`kn3^~i$#`kn3^~i$#`kn3^~RJ^~?w)B^~?kH^~R^z]K#YS+a_l{]C#a_k#k_k~?iS/_{!.#b`n9DAd`Ca_#ZCex>#d~TbZBi&:EiS/NeZ@AAfi$i$akS_nM`~?x0^.:EgYPecEfNdboMa_~?x:^.ZKdUlbMbNa_~O?x6_9DAd`Ca_#ZCex>#d~TbZBi&:EiS/NeZ@AAfi$i$akS_nM`~?x0^.:EgYPecEfNdboMa_~?x:^.ZKdUlbMbNa_~O^~^?x1^#cMan~?x=^G_~F_#bUk``m~YM_|!94_@K^{!J4uy]?'i$9?C_@K^G^~F^z]I'i$'i$9IC^@YGG^~F^@KvC~F^z!E8EYS(^89vS7vF~Z(^9?YD^~YK^8EZ)^~YM^4vL@ZIC^@YGG^@KvK~F^89vLvK~T^89vS;vF~?i%^89vS-vF~Z%^z!G8E^4vE@Z?YD^@KvE~YK^z]O9O8@~?u^'^~Ik^Dy!@8@@D'^9O~?vR0^~I_vC'iS0~YN^YFy!?*V^@D'i&~OO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io.stdout b:write(string.char(a))b:flush()return a end g=0 function n(a)g=e(a,g,0)end function M()f=io.stdin:read(1)if not f then f=-1 else f=f:byte(1)end n(f)end C=0 function I()C=C+1 b=O:byte(C)or 0 return b end function A(a)if a then return G else return F end end function i()a=g[1]g=g[2]return a end function o(u)return function()b=i()n(u(b))end end function m(u)return function()q=i()b=i()n(u(b,q))end end function T(u)return function()f=i()q=i()b=i()n(u(b,q,f))end end function N()b=i()i()n(b)end function P()n(e(i()[1],g,1))end function X(a,d)a[1]=d return d end function V(a,d)a[2]=d return d end function R(a,d)a[3]=d return d end function W(a,d)q=math.floor b=a/d if b<0 then return-q(-b)else return q(b)end end S={T(e),o(function(a)return a end),i,N,P,o(function(a)return A(p(a))end),o(function(a)return a[1]end),o(function(a)return a[2]end),o(function(a)return a[3]end),m(X),m(V),m(R),m(function(a,d)return A(a==d)end),m(function(a,d)return A(a<d)end),m(function(a,d)return a+d end),m(function(a,d)return a-d end),m(function(a,d)return a*d end),m(W),M,o(U),o(os.exit)}function L()b=I()-35 if b<0 then return 57 else return b end end function y(a)b=L()a=a*46 if b<46 then return a+b else return y(a+b-46)end end function D(a,d)if d==0 then return a else return D(a[2],d-1)end end j=w function J(a)return D(j,a)[1]end function x(a)j[1][1]=a j=j[2]end c=y(0)while c>0 do c=c-1 j=e(e(0,e(w,0,3),2),j,0)end s=w c=0 while true do f=I()if f==44 then j=e(e(0,e(s,c,3),2),j,0)s=w c=0 else if f==59 then break end s=e(f,s,0)c=c+1 end end j=e(e(0,e(s,c,3),2),j,0)while true do a=L()c=a r=0 l=0 while true do b={20,30,0,10,11,4}r=b[l+1]if c<=2+r then break end c=c-(r+3);l=l+1 end if a>90 then c=i()else if l==0 then g=e(0,g,0);l=l+1 end if c==r then c=y(0)elseif c>=r then c=J(y(c-r-1))elseif l<3 then c=J(c)end if 4<l then c=e(e(c,0,i()),0,1)if not p(g)then break end l=4 end end g[1]=e(l-1,c,g[1])end x(e(0,j,1))x(F)x(G)x(w)function B(k)if p(k)then return k else return D(g,k)end end function K()b=g while not p(b[3])do b=b[2]end return b end h=c[1][3]g=e(0,0,e(5,0,0))while true do k=h[2]t=h[1]if t<1 then k=B(k)[1]f=k[1]if p(f)then v=e(0,k,0)E=v z=f[1]while z>0 do E=e(i(),E,0)z=z-1 end if p(h[3])then v[1]=g v[3]=h[3]else H=K()v[1]=H[1]v[3]=H[3]end g=E else S[f+1]()if p(h[3])then f=h else f=K()g[2]=f[1]end end h=f[3]elseif t<2 then a=i()B(k)[1]=a h=h[3]elseif t<3 then n(B(k)[1])h=h[3]elseif t<4 then n(k)h=h[3]elseif t<5 then if i()==F then h=h[3]else h=h[2]end else break end end