#include <bits/stdc++.h>


using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    long long x , y;
    vector<int> cifre;
    cin >> x >>y;

    while(x > 0 || y > 0)
    { 
        if(x % 10 != y % 10)
            cifre.push_back(max(x % 10 , y % 10));
        else
        { 
            if(x != 0)
                cifre.push_back(x % 10);
            if(y != 0)
                cifre.push_back(y % 10);
        }
        x = x / 10;
        y = y / 10;
    }
for(int i = cifre.size() - 1; i >= 0; i--)
    cout << cifre[i];
    
    
    return 0;
}