#include <algorithm>
#include <string>
#include <iostream>
using namespace std;
void reverseStr(string& str)
{
	int len = str.length();
	if (len < 2)return;
	int n = len - 1;
	int i = 0;
	while (i <= n) {
		swap(str[i], str[n]);
		n = n - 1;
		i = i + 1;
	}

}
void Sudar(int x,int y){
	string a, b;
	char rez[30] = { '#' };
	a = to_string(x);
	reverseStr(a);
	b = to_string(y);
	reverseStr(b);
	int cnt = 0;
	for (int i = 0; i < min(a.length(), b.length()); i++)
	{
		if (a[i] == b[i]) {
			rez[cnt] = a[i];
			cnt++;
			rez[cnt] = a[i];
		}	
		else
		{
			rez[cnt] = max(a[i], b[i]);
		}
		cnt++;
	}
	if (a.length() > b.length())
	{
		a.erase(0, min(a.length(), b.length())-1);
		for (int i = 0; i <= a.length() - min(a.length(), b.length()); i++)
		{
			rez[cnt] = a[i];
			cnt++;
		}
	}
	else {
		
			b.erase(0, min(a.length(), b.length())-1 );
			for (int i = 0; i <= b.length() - min(a.length(), b.length()); i++)
			{
				rez[cnt] = b[i];
				cnt++;
			}
		
	}
	for (int i = cnt - 1; i >= 0; i--)
	{
		cout << rez[i];
	}

}
int main()
{
	int x, y;
	cin >> x >> y;
	Sudar(x,y);
	return 69420;
}