#include <bits/stdc++.h>
using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int a, b;
    int cifra;
    int cifra2;
    int i = 0;
    vector<int> v; 
    vector<int> v2; 
    vector<int>::iterator it; 
    cin >> a;
    cin >> b;
    while(a > 0){
        cifra = a%10;
        a/10;
        v.push_back(cifra);
    }
    reverse(v.begin(), v.end());
    while(b > 0){
        cifra2 = b%10;
        b/10;
        v2.push_back(cifra2);
    }
    reverse(v2.begin(), v2.end());
    for(it = v.begin(); it != v.end(); it++, i++){
        if(v[i] > v2[i]){
            cout << v[i];
        }
        else if(v[i] < v2[i]){
            cout << v2[i];
        }
        else{
            cout << v[i] << v2[i];
        }
    }
    return 0;
}