#include <iostream> #include <fstream> #include <vector> #include <queue> #include <utility> #include <algorithm> #include <functional> #include <string> #include <cstring> #include <cmath> #include <map> #include <set> #include <stack> #define NMAX 1000005 #define MOD 666013 #define INF 0x3f3f3f3f #define pb push_back using namespace std; typedef pair<int, int> pii; //ifstream fin("fisier.in"); //ofstream fout("fisier.out"); string s; inline bool goodChar(char x) { return (x>='A'&& x<='Z'); } inline bool digit(char x) { return (x>='0'&& x<='9'); } int main() { int n,i,j,t,res,ok; cin>>n; while(n--) { cin>>s; ok=1; if(s=="B") { cin>>s; if(s.size()!=3) ok=0; if(!(digit(s[0]) && digit(s[1]) && digit(s[2]))) ok=0; cin>>s; if(s.size()!=3) ok=0; if(!(goodChar(s[0]) && goodChar(s[1]) && goodChar(s[2]))) ok=0; }else { if(!(goodChar(s[0]) && goodChar(s[1]))) ok=0; if(s.size()!=2) ok=0; cin>>s; if(!(digit(s[0]) && digit(s[1]))) ok=0; if(s.size()!=2) ok=0; cin>>s; if(s.size()!=3) ok=0; if(!(goodChar(s[0]) && goodChar(s[1]) && goodChar(s[2]))) ok=0; } if(ok) cout<<"Correct!\n"; else cout<<"Incorrect!\n"; } return 0; }