#include #define x s using namespace std; char s[22]; inline bool mare(char ch) { return 'A' <= ch && ch <= 'Z'; } int main() { int t; scanf("%d\n", &t); for (int i = 1; i <= t; ++i) { gets(s + 1); int n = strlen(s + 1); if (s[1] == 'B' && s[2] == ' ') { int ptr = 3; while (ptr <= n && isdigit(x[ptr])) ++ptr; if (ptr == 5 || ptr == 6) { if (ptr + 3 == n && x[ptr] == ' ' && mare(x[ptr + 1]) && mare(x[ptr + 2]) && mare(x[ptr + 3])) printf("Correct!"); else printf("Incorrect!"); } else printf("Incorrect!"); } else if (mare(s[1]) && mare(s[2]) && s[3] == ' ') { if (n == 9 && isdigit(s[4]) && isdigit(s[5]) && s[6] == ' ' && mare(s[7]) && mare(s[8]) && mare(s[9])) printf("Correct!"); else printf("Incorrect!"); } else { printf("Incorrect!"); } printf("\n"); } return 0; }