#include <bits/stdc++.h>

using namespace std;

int main()
{

    long long br1,br2,pom1,pom2;
    deque<long long> br;
    cin>>br1>>br2;
    while(br1+br2!=0)
    {
        pom1=br1%10;
        pom2=br2%10;
        if(pom1>pom2)
        {
            br.push_front(pom1);
        }
        if(pom2>pom1)
        {
            br.push_front(pom2);
        }
        if(pom1==pom2)
        {
            if(br1==0)
                br.push_front(pom2);
            if(br2==0)
                br.push_front(pom1);
            if(br1!=0 && br2!=0)
            {
                br.push_front(pom1);
                br.push_front(pom2);
            }
        }
        br1=br1/10;
        br2=br2/10;
    }
    while(!br.empty())
    {
        cout<<br.front();
        br.pop_front();
    }
    return 0;
}