望好心人帮忙调试qwq
#include<bits/stdc++.h>
using namespace std;
void dfs(string a,string b){
if(a.size()==0&&b.size()==0){
return ;
}
int n=a.size();
cout<<b[n-1];
int w;
for(int i=0;i<n;i++){
if(a[i]==b[n-1]){
w=i;
}
}
string x,y;
x=a.substr(0,w),y=b.substr(0,w);
dfs(x,y);
x=a.substr(w+1,w),y=b.substr(w+1,w);
dfs(x,y);
return ;
}
int main(){
string a,b;
cin>>a>>b;
dfs(a,b);
return 0;
}