#include <iostream>
#include <cmath>

using namespace std;

int out[20];
int index = 0;

void add(int num){
	out[index++] = num;
}

int main() {
	int X, Y;
	cin>>X>>Y;
	
	int _X[10], xSize;
	int _Y[10], ySize;
	
	int i = 0;
	while(X > 0){
		_X[i++] = X % 10;
		X /= 10;
	}
	xSize = i;
	
	i = 0;
	while(Y > 0){
		_Y[i++] = Y % 10;
		Y /= 10;
	}
	ySize = i;
	
	int maxSize = max(xSize, ySize);
	
	for(i = 0; i < maxSize; i++){
		bool hasX = i < xSize;
		bool hasY = i < ySize;
		
		if(!hasX && !hasY) break;
		
		if(hasX && !hasY) add(_X[i]);
		else if(!hasX && hasY) add(_Y[i]);
		else {
			if(_X[i] > _Y[i]) add(_X[i]);
			else if(_Y[i] > _X[i]) add(_Y[i]);
			else {
				add(_X[i]);
				add(_Y[i]);
			}
		}
	}
	
	for(i = index - 1; i >= 0; i--){
		cout<<out[i];
	}
	return 0;
}