#include <bits/stdc++.h>

using namespace std;

int main()
{
    unsigned int x,y,z = 0,stepen = 0;
    cin >> x >> y;
    while(x != 0 || y != 0){
        int n = x%10, m = y%10;
        if(n > m){
            z = z + n*pow(10,stepen);
        }
        else if(n < m){
            z = z + m*pow(10,stepen);
        }
        else if(n == 0 && m == 0){
            z = z + n*pow(10,stepen);
        }
        else if(n == m){
            z = z + n*pow(10,stepen);
            stepen++;
            z = z + n*pow(10,stepen);
        }
        
        x = x/10;
        y = y/10;
        stepen++;
    }
    cout << z <<"\n";
    
    return 0;
}