#include <iostream>

using namespace std;

int main()
{

    int a;
    int b;

    cin >> a;
    cin >> b;
    if (a == 0 && b == 0) {
        cout << 0;
    }
  

    int min = a < b ? a : b;
    int max = a > b ? a : b;

    int niz[20];
    int duzina = 0;

    while (min != 0) {
        int cifra1 = min % 10;
        int cifra2 = max % 10;

        min /= 10;
        max /= 10;

        if (cifra1 > cifra2) {
            niz[duzina++] = cifra1;
        }
        else if (cifra1 < cifra2) {
            niz[duzina++] = cifra2;
        }
        else {
            niz[duzina++] = cifra1;
            niz[duzina++] = cifra2;
        }
    }

    while (max != 0) {
        niz[duzina++] = max % 10;
        max /= 10;
    }

    for (int i = duzina - 1; i >= 0; i--) {
        cout << niz[i];
    }

    return 0;
}