program filip;
var a,b,c:integer;
st1,st2,st3,st4,st5,st6:string;
begin
readln(st1,st2); st5:=''; st6:='';
for a:=3 downto 1 do begin
st3:=copy(st1,a,1); st4:=copy(st2,a,1);
st5:=st5+st3; st6:=st6+st4; end;
val(st5,b); val(st6,c);
if b>c then writeln(b) else writeln(c);
end.
