a,b:char;
begin
readln(a,b);
if ord(a)>ord(b) then writeln(b,' ',a)
else (writeln(a,' ',b));
end.
應該沒錯