import Data.Char e=181021504832735228091659724090293195791121747536890433 u(f,m)x=i(m(x), [],let(a,b)=f(x) in(a:u(f,m)b)) (v,h)=(foldr(\x(y )->00+128*y+x)0,u( sp(25),((==)""))) p::(Integer,Integer )->Integer -> Integer --NotInt p(n,m)x =i(n==0 ,1,i(z n ,q(n,m)x, r(n,m)x)) i(n,e,d )=if(n) then(e) else (d) --23+3d4f (g,main ,s,un)= (\x->x, y(j),\x->x*x,unlines)--) j(o)=i(take(2)o== "e=","e="++t (drop(4-2)o),i(d>e,k,l)o) l=un.map (show.p (e,n).v.map( fromIntegral{-g-}.ord)).h k=co.map(map(chr .fromIntegral ).w.p(d,n). read).lines (t,y)=(\ (o:q)-> i(o=='-' ,'1','-' ): q,interact) q(n,m)x= mod(s( p( div(n)2, m{-jl-})x) )m--hd&&gdb (r,z,co) =(\(n, m)x->mod(x*p(n-1, m)x)m,even ,concat)--6 (w,sp)=( u(\x->( mod(x)128,div(x )128),(==0 )),splitAt) d=563347325936+1197371806136556985877790097-563347325936 n=351189532146914946493104395525009571831256157560461451