#include <bits/stdc++.h>
using namespace std;
int duzina;
string X,Y,novi;
int main(){
  cin>>X>>Y;
  reverse(X.begin(),X.end());
  reverse(Y.begin(),Y.end());
  //cout<<"X: "X<<endl<<"Y: "<<Y<<endl;
  duzina=max(X.size(),Y.size());
  for(int i = 0;i<duzina;i++){
    if(X[i]>Y[i]) {
        novi.push_back(X[i]);
    }
    if(X[i]==Y[i]){
      novi.push_back(Y[i]);
      novi.push_back(X[i]);
    }
    if(X[i]<Y[i]){
        novi.push_back(Y[i]);
    }
  }
  reverse(novi.begin(),novi.end());
  cout<<novi<<endl;

  return 0;
}