#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define all(x) x.begin(), x.end()
#define pf push_front
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define sz(x) (int)x.size()
#define f first
#define s second
#define mod 1000000007
// const int mod = 998244353;
// OVERFLOW!!!!!!!!!!!!!!!!!!

int main()
{
   ios_base::sync_with_stdio(false);
   cout.tie(nullptr);
   cin.tie(nullptr);
   string s, t;
   cin >> s >> t;
   string ans = "";
   int i = sz(s) - 1, j = sz(t) - 1;
   while (i >= 0 && j >= 0)
   {
      if (s[i] == t[j])
      {
         ans += s[i];
         ans += t[j];
      }
      else if (s[i] - '0' > t[j] - '0')
         ans += s[i];
      else
         ans += t[j];
      --i, --j;
   }
   while (i >= 0)
   {
      ans += s[i];
      --i;
   }
   while (j >= 0)
   {
      ans += t[j];
      --j;
   }
   reverse(all(ans));
   cout << ans;
   return 0;
}