#include <stdio.h>

int main()
{
    long long x,y;
    scanf("%lld%lld",&x,&y);
    long long res=0;
    while (x!=0 || y!=0)
    {
        int a=x%10;
        int b=y%10;
        if (y==0) b=-1;
        if (x==0) a=-1;
        if (b>a) res=res*10+b;
        else if (a>b) res=res*10+a;
        else res=(res*10+a)*10+b;
        x/=10;
        y/=10;
    }
    while (res!=0)
    {
        printf("%d",res%10);
        res/=10;
    }
}