m@main=getLine>>=putStrLn.f.lex>>m f[(a,b)]=a++' ':toEnum(61+signum(read a-read b)):b