program hello;
var x, y, n , z : integer;
begin
read(x,y);
if x>0 then
if y>0 then
while x>-1 do
begin
while y>-1 do
begin
n:=x mod 10;
z:=y mod 10;
if n>z then
write(n);
if z>n then
write(z);
x:= x div 10;
y:= y div 10;
end
end
end.