#include <bits/stdc++.h>

using namespace std;

int main() {
    string x, y;
    cin >> x >> y;
    int n = x.length();
    int m = y.length();
    string resenje = "";
    reverse(x.begin(), x.end());
    reverse(y.begin(), y.end());
    if(n > m) {
        for(int i = 0; i < n - m; i++) {
            y += "0";
        }
    } else {
        for(int i = 0; i < m - n; i++) {
            x += "0";
        }
    }
    for(int i = 0; i < x.length(); i++) {
        if(x[i] > y[i]) {
            resenje += x[i];
        } else if(x[i] < y[i]) {
            resenje += y[i];
        } else if(x[i] == y[i] && x[i] != "0"){
            resenje += x[i];
            resenje += y[i];
        } else {
            resenje += "0";
        }
    }

    reverse(resenje.begin(), resenje.end());

    cout << resenje;

    return 0;
}