#include<bits/stdc++.h>
using namespace std;
string word;
string password;
string need_translate_word;
char out[2000];
char corresponds_word[26];
int main(){
cin>>word>>password>>need_translate_word;
for(unsigned i=0;i<word.size();i++){
corresponds_word[word[i]-'A']=password[i];
}
for(unsigned i=0;i<26;i++){
for(unsigned j=i+1;j<26;j++){
if(corresponds_word[i]==corresponds_word[j]&&corresponds_word[i]!=' '){
printf("Failed");
return 0;
}
}
}
for(unsigned i=0;i<need_translate_word.size();i++){
if(corresponds_word[need_translate_word[i]-'A']<'A'||corresponds_word[need_translate_word[i]-'A']>'Z'){
printf("Failed");
return 0;
}
out[i]=corresponds_word[need_translate_word[i]-'A'];
}
printf("%s",out);
}
//样例二确实是一个字母对应唯一一个字母
哪里错了呢,拜求大佬指教!