第三个测试点注意特判就可以了
#include<iostream>
#include<sstream>
#include<algorithm>
#include<vector>
using namespace std;
string t;
vector<int>ans;
int main(){
ios::sync_with_stdio(false),cin.tie(0),cout.tie(0);
getline(cin,t);
transform(t.begin(),t.end(),t.begin(),::tolower);
istringstream in(t);
for(int i=1;i<=6;i++){
string s;
in>>s;
int x=-1;
if(s.size()==1){
if(s[0]=='a') x=1;
}
else if(s.size()==3){
if(s[0]=='o'&&s[1]=='n'&&s[2]=='e') x=1;
if(s[0]=='t'&&s[1]=='w'&&s[2]=='o') x=2;
if(s[0]=='s'&&s[1]=='i'&&s[2]=='x') x=6;
if(s[0]=='t'&&s[1]=='e'&&s[2]=='n') x=10;
}
else if(s.size()==4){
if(s[0]=='z'&&s[1]=='e'&&s[2]=='r'&&s[3]=='o') x=0;
if(s[0]=='f'&&s[1]=='o'&&s[2]=='u'&&s[3]=='r') x=4;
if(s[0]=='f'&&s[1]=='i'&&s[2]=='v'&&s[3]=='e') x=5;
if(s[0]=='n'&&s[1]=='i'&&s[2]=='n'&&s[3]=='e') x=9;
if(s[0]=='b'&&s[1]=='o'&&s[2]=='t'&&s[3]=='h') x=2;
}
else if(s.size()==5){
if(s[0]=='t'&&s[1]=='h'&&s[2]=='r'&&s[3]=='e'&&s[4]=='e') x=3;
if(s[0]=='s'&&s[1]=='e'&&s[2]=='v'&&s[3]=='e'&&s[4]=='n') x=7;
if(s[0]=='e'&&s[1]=='i'&&s[2]=='g'&&s[3]=='h'&&s[4]=='t') x=8;
if(s[0]=='f'&&s[1]=='i'&&s[2]=='r'&&s[3]=='s'&&s[4]=='t') x=1;
if(s[0]=='t'&&s[1]=='h'&&s[2]=='i'&&s[3]=='r'&&s[4]=='d') x=3;
}
else if(s.size()==6){
if(s[0]=='e'&&s[1]=='l'&&s[2]=='e'&&s[3]=='v'&&s[4]=='e'&&s[5]=='n') x=11;
if(s[0]=='t'&&s[1]=='w'&&s[2]=='e'&&s[3]=='l'&&s[4]=='v'&&s[5]=='e') x=12;
if(s[0]=='t'&&s[1]=='w'&&s[2]=='e'&&s[3]=='n'&&s[4]=='t'&&s[5]=='y') x=20;
if(s[0]=='s'&&s[1]=='e'&&s[2]=='c'&&s[3]=='o'&&s[4]=='n'&&s[5]=='d') x=2;
}
else if(s.size()==7){
if(s[0]=='f'&&s[1]=='i'&&s[2]=='f'&&s[3]=='t'&&s[4]=='e'&&s[5]=='e'&&s[6]=='n') x=15;
if(s[0]=='s'&&s[1]=='i'&&s[2]=='x'&&s[3]=='t'&&s[4]=='e'&&s[5]=='e'&&s[6]=='n') x=16;
if(s[0]=='a'&&s[1]=='n'&&s[2]=='o'&&s[3]=='t'&&s[4]=='h'&&s[5]=='e'&&s[6]=='r') x=1;
}
else if(s.size()==8){
if(s[0]=='t'&&s[1]=='h'&&s[2]=='i'&&s[3]=='r'&&s[4]=='t'&&s[5]=='e'&&s[6]=='e'&&s[7]=='n') x=13;
if(s[0]=='f'&&s[1]=='o'&&s[2]=='u'&&s[3]=='r'&&s[4]=='t'&&s[5]=='e'&&s[6]=='e'&&s[7]=='n') x=14;
if(s[0]=='e'&&s[1]=='i'&&s[2]=='g'&&s[3]=='h'&&s[4]=='t'&&s[5]=='e'&&s[6]=='e'&&s[7]=='n') x=18;
if(s[0]=='n'&&s[1]=='i'&&s[2]=='n'&&s[3]=='e'&&s[4]=='t'&&s[5]=='e'&&s[6]=='e'&&s[7]=='n') x=19;
}
else if(s.size()==9){
if(s[0]=='s'&&s[1]=='e'&&s[2]=='v'&&s[3]=='e'&&s[4]=='n'&&s[5]=='t'&&s[6]=='e'&&s[7]=='e'&&s[8]=='n') x=17;
}
if(x!=-1) ans.push_back(x*x%100);
}
if(ans.size()==0) {cout<<0<<endl;return 0;}
sort(ans.begin(),ans.end());
string res;
for(auto x:ans){
res+='0'+x/10;
res+='0'+x%10;
}
int idx=0;
for(int i=0;i<res.size();i++) if(res[i]!='0') {idx=i;break;}
for(int i=idx;i<res.size();i++) cout<<res[i];
return 0;
}