var s:string;begin repeat readln(s);writeln(^(:ord(s>^)),s)until 0>0end.