r=reverse m@main=getLine>>=putStrLn.r.b.r>>m b[]=[] b(q:x)|q<'1'='1':x|1>0='0':b x