#include <iostream>
#include <string>
using namespace std;
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
int iTimes;
string sCode;
while(cin>>iTimes){
sCode='\n';
getline(cin,sCode);
for(int i=0;i<iTimes;i++){
getline(cin,sCode);
if(sCode=="0 1 0 1")
cout<<"A";
else if(sCode=="0 1 1 1")
cout<<"B";
else if(sCode=="0 0 1 0")
cout<<"C";
else if(sCode=="1 1 0 1")
cout<<"D";
else if(sCode=="1 0 0 0")
cout<<"E";
else if(sCode=="1 1 0 0")
cout<<"F";
}
cout<<'\n'<<flush;
}
return 0;
}
使用ios::sync_with_stdio(false);和cin.tie(0);來加速cin/cout避免測資5 TLE