m@main=getLine>>=putStrLn.f"""">>m r=reverse f b[][]=r b f b g[]=r b++f"/"""(r g) f b g(a:s)|a`elem`b=f b(a:g)s|0<1=f(a:b)g s