#include <iostream>
using namespace std;
string a,b;
void f(string xx,string zx){
if(xx.size()==0) return ;
char root=xx[0];
int rootid=zx.find(root);
string lzx=zx.substr(0,rootid);
string rzx=zx.substr(rootid+1);
string lxx=xx.substr(1,rootid);
string rxx=xx.substr(rootid+1);
f(lxx,lzx);
f(rxx,rzx);
cout<<root;
}
int main(){
cin>>a>>b;
f(a,b);
return 0;
}
(责任编辑:admin) |