#include<bits/stdc++.h>
using namespace std;
string x, y;
void dfs(string x, string y)
{
char c = x[0];
int s = x.find(c), len = x.size();
if(s != 0)
{
dfs(x.substr(1, s), y.substr(0, s));
}
if(s + 1 <= len - 1)
{
dfs(x.substr(s + 1), y.substr(s + 1));
}
cout << c;
}
int main()
{
cin >> x >> y;
dfs(y, x);
return 0;
}