#include #include #include #include #include #include #include #include #include #include #include #include #include #define NMAX 1000005 #define MOD 666013 #define INF 0x3f3f3f3f #define pb push_back using namespace std; typedef pair pii; //ifstream fin("fisier.in"); //ofstream fout("fisier.out"); char s[25]; inline bool goodChar(char x) { return (x>='A'&& x<='Z'); } inline bool digit(char x) { return (x>='0'&& x<='9'); } int main() { int n; cin>>n; cin.get(); while(n--) { cin.getline(s,25); if(s[0] == 'B' && s[1]==' ') { if(digit(s[2])&&digit(s[3])&&digit(s[4]) && s[5]==' ' && goodChar(s[6])&&goodChar(s[7])&&goodChar(s[8]) && s[9]==0) cout<<"Correct!\n"; else cout<<"Incorrect!\n"; } else { if(goodChar(s[0])&&goodChar(s[1]) && s[2]==' ' && digit(s[3])&&digit(s[4]) && s[5]==' ' && goodChar(s[6])&&goodChar(s[7])&&goodChar(s[8]) && s[9]==0) cout<<"Correct!\n"; else cout<<"Incorrect!\n"; } } return 0; }