#include<iostream>
#include<string>
using namespace std;
string str1,str2,str3;
char table[205];
int flagarr[205];
bool ok=true;
int main() {
cin>>str1>>str2>>str3;
for(int i=0; i<str2.size(); i++) {
flagarr[str2[i]-'A']++;
if(table[str1[i]-'A']!=0&&table[str1[i]-'A']!=str2[i]) {
ok=false;
break;
}
table[str1[i]-'A']=str2[i];
}
for(int i=0; i<26; i++) {
if(flagarr[i]==0) {
ok=false;
break;
}
}
if(!ok) {
cout<<"Failed"<<endl;
} else {
for(int i=0; i<str3.size(); i++) {
cout<<table[str3[i]-'A'];
}
cout<<endl;
}
return 0;
}
有什么不一样的地方