#include #define pb push_back #define mp make_pair #define mt make_tuple #define ll long long #define pii pair #define tii tuple #define N 200005 #define mod 1000000005 #define X first #define Y second #define eps 0.0000000001 #define all(x) x.begin(),x.end() #define tot(x) x+1,x+n+1 using namespace std; string in = "Incorrect!\n", co = "Correct!\n", s; int ok, t, i, n; int main() { cin.sync_with_stdio(0); cout.sync_with_stdio(0); cin >> t; for(; t; t--) { cin >> s; if(s[0] == 'B' && s.size() == 1) { cin >> s; ok = 1; if(s.size() == 2 || s.size() == 3) { for(i == 0; i < s.size(); i++) if(!isdigit(s[i]) && ok) { cout << in; ok = 0; } cin >> s; if(s.size() == 3) { for(i = 0; i < 3; i++) if(!(s[i] >= 'A' && s[i] <= 'Z') && ok) { cout << in; ok = 0; } } else if(ok) { cout << in; ok = 0; } if(ok) cout << co; } else { cin >> s; if(ok) { cout << in; ok = 0; } } } else { ok = 1; if(s.size() == 2) { for(i = 0; i < 2; i++) if(!(s[i] >= 'A' && s[i] <= 'Z') && ok) { cout << in; ok = 0; } cin >> s; if(s.size() == 2) { for(i == 0; i < s.size(); i++) if(!isdigit(s[i]) && ok) { cout << in; ok = 0; } cin >> s; if(s.size() == 3) { for(i = 0; i < 3; i++) if(!(s[i] >= 'A' && s[i] <= 'Z') && ok) { cout << in; ok = 0; } } else if(ok) { cout << in; ok = 0; } if(ok) cout << co; } else { cin >> s; if(ok) { cout << in; ok = 0; } } } else { cin >> s >> s; if(ok) { cout << in; ok = 0; } } } } return 0; }