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

typedef long long ll;
#define dbg(x) cout << (x) << "\n"

int main(){
	
	ll x,y;
	cin >> x;
	cin >> y;
	vector<ll> br;

	while(x != 0 && y != 0){
		if(x % 10 > y % 10){
			br.push_back(x % 10);
		}
		else if(x % 10 < y % 10){
			br.push_back(y % 10);
		}
		else{
			br.push_back(x % 10);
			br.push_back(y % 10);
		}
		x /= 10;
		y /= 10;
	}
	while(x != 0){
		br.push_back(x % 10);
		x /= 10;
	}
	while(y != 0){
		br.push_back(y % 10);
		y /= 10;
	}

	reverse(br.begin(), br.end());
	for(int i = 0; i < br.size(); i++){
        cout << br[i];
    }

	return 0;
}