文件目录

#include <bits/stdc++.h>
using namespace std;
void gethx(string xx, string zx)
{
    if (xx.size() == 0)
        return;
    char root = xx[0];
    int id = zx.find(root);
    gethx(xx.substr(1, id), zx.substr(0, id));
    gethx(xx.substr(id + 1), zx.substr(id + 1));
    cout << root;
}
int main()
{
    string xx, zx;
    cin >> xx >> zx;
    gethx(xx, zx);
    return 0;
}