#include <bits/stdc++.h>
#define ll long long

using namespace std;

int main()
{
  ll x, y;
  cin >> x >> y;

  vector<int> dx;
  vector<int> dy;

  while (x)
  {
    dx.push_back(x % 10);
    x /= 10;
  }

  while (y)
  {
    dy.push_back(y % 10);
    y /= 10;
  }

  reverse(dx.begin(), dx.end());
  reverse(dy.begin(), dy.end());

  vector<int> res;

  int xi = 0;
  int yi = 0;

  int diff = abs((int)dx.size() - (int)dy.size());

  if (dx.size() < dy.size())
    swap(dx, dy);

  for (int i = 0; i < diff; i++)
  {
    res.push_back(dx[i]);
    xi++;
  }

  while (yi < dy.size())
  {
    if (dx[xi] == dy[yi])
    {
      res.push_back(dx[xi]);
      res.push_back(dx[xi]);
    }
    else if (dx[xi] > dy[yi])
    {
      res.push_back(dx[xi]);
    }
    else
    {
      res.push_back(dy[yi]);
    }
    xi++;
    yi++;
  }

  for (int i = 0; i < res.size(); i++)
  {
    cout << res[i];
  }

  cout << "\n";
}