#include #include #include #include #include #define NMAX 5000005 using namespace std; string sir; int n; bool verif() { if(regex_match(sir , regex("B [0-9]{2,3} [A-Z]{3}"))) { return 1; } if(regex_match(sir , regex("[A-Z]{2} [0-9]{2} [A-Z]{3}"))) { return 1; } return 0; } int main() { #ifndef ONLINE_JUDGE freopen("input.txt" , "r" , stdin); #endif // ONLINE_JUDGE cin >> n; getchar(); for(int i = 1 ; i <= n ; ++i) { getline(cin, sir); if(verif()) { cout << "Correct\n"; } else { cout << "Incorrect\n"; } } return 0; }