#include <iostream>
#include <string>

int main() {
    unsigned int a, b;
    std::cin >> a >> b;
    std::string x;
    bool shouldPrint = false;
    while (a != 0 || b != 0) {
        unsigned int n = a % 10;
        unsigned int m = b % 10;
        if (a == 0 && shouldPrint) {
            std::cout << std::to_string(b) + x << std::endl;
            return 0;
        } else if (b == 0 && shouldPrint) {
            std::cout << std::to_string(a) + x << std::endl;
            return 0;
        } else {
            if (n > m) {
                x += std::to_string(n);
            } else if (n < m) {
                x += std::to_string(m);
            } else {
                x += std::to_string(n);
                x += std::to_string(m);
            }
            if (std::to_string(a).back() == '0') {
                shouldPrint = true;
            }
            if (std::to_string(b).back() == '0') {
                shouldPrint = true;
            }
            a /= 10;
            b /= 10;
        }
    }
    std::string y;
    for (int i = x.size() - 1; i >= 0; i--) {
        y += x[i];
    }
    std::cout << y << std::endl;
    return 0;
}