program filip;
var  a,b,x,y:string[4];
     i,j:integer;
begin

readln(a,b);

for i:=3 downto 1 do
x:=(a[3]+a[2]+a[1]);

for j:=3 downto 1 do
y:=(b[3]+b[2]+b[1]);

if x>y then writeln(x);
if x<y then writeln(y);
if x=y then writeln(x);

end.



