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

int x,as,bs;
string a,b,res;

int main(){
  cin >> a >> b;
  as = a.size();
  bs = b.size();
  x = abs(as-bs);

  if(as > bs){
    for(int i = 0; i < x; i++){
      res.push_back(a[i]);
    }
    for(int i = x; i < as; i++){
      if(a[i] > b[i-x]){
        res.push_back(a[i]);
      }
      else if(a[i] < b[i-x]){
        res.push_back(b[i-x]);
      }
      else{
        res.push_back(a[i]);
        res.push_back(a[i]);
      }
    }
  }
  else if(as < bs){
    for(int i = 0; i < x; i++){
      res.push_back(b[i]);
    }
    for(int i = x; i < bs; i++){
      if(b[i] > a[i-x]){
        res.push_back(b[i]);
      }
      else if(b[i] < a[i-x]){
        res.push_back(a[i-x]);
      }
      else{
        res.push_back(b[i]);
        res.push_back(b[i]);
      }
    }
  }
  else{
    for(int i = 0; i < as; i++){
      if(a[i] > b[i]){
        res.push_back(a[i]);
      }
      else if(a[i] < b[i]){
        res.push_back(b[i]);
      }
      else{
        res.push_back(a[i]);
        res.push_back(a[i]);
      }
    }
  }
  cout << res << endl;

  return 0;
}