f(a:_:b)=a:"<=>"!!fromEnum(compare a$b!!0):f b f z=z m@main=getLine>>=putStrLn.f>>m