#include <string>   
#include<iostream>
#include<algorithm>
using namespace std;


int main()
{
	int first_number, second_number;
	cin >> first_number >> second_number;
	string longer_string = "";
	string result1 = "";


	string first_string = to_string(first_number);
	string second_string = to_string(second_number);

	reverse(first_string.begin(), first_string.end());
	reverse(second_string.begin(), second_string.end());

	int size1 = first_string.size();
	int size2 = second_string.size();
	
	int loop = 0;
	
	if (size1 > size2) {
		loop = size2;
	}

	else {
		loop = size1;
	}

	for (int a = 0; a < loop; a++) {
		if ((int)first_string[a] > (int)second_string[a]) {
			result1 += first_string[a];
		}
		else if ((int)first_string[a] < (int)second_string[a]) {
			result1 += second_string[a];
			}
		
		else {
			result1 += first_string[a];
			result1 += second_string[a];
		}
	}

	if (size1 > size2) {
		result1 += first_string.substr(loop);
	}
	else if (size1 < size2) {
		result1 += second_string.substr(loop);
	}

	reverse(result1.begin(), result1.end());
	cout << result1;

	return 0;
}