#include #include using namespace std; int n,i; char t[50]; string res[50]; bool valid (char t[]) { if (t[0]=='B' && t[1]==' ') { if ('0'>t[3] || '9't[2] || '9't[4]) { if (t[5]!=' ') return false; if ('A'<=t[8] && 'Z'>=t[8] && 'A'<=t[6] && 'Z'>=t[6] && 'A'<=t[7] && 'Z'>=t[7]) return true; return false; } else { if (t[4]!=' ') return false; if ('A'<=t[5] && 'Z'>=t[5] && 'A'<=t[6] && 'Z'>=t[6] && 'A'<=t[7] && 'Z'>=t[7]) return true; return false; } } else if ('A'<=t[0] && 'Z'>=t[0] && 'A'<=t[1] && 'Z'>=t[1]) { if (strlen(t)!=9) return false; if (t[2]!=' ') return false; if ('0'>t[3] || '9't[4] || '9'=t[8] && 'A'<=t[6] && 'Z'>=t[6] && 'A'<=t[7] && 'Z'>=t[7]) return true; return false; } else return false; } int main() { cin>>n; cin.ignore(); for (int i=1;i<=n;i++) { cin.getline(t,50); if(valid(t)) res[i]="Correct!\n"; else res[i]="Incorrect!\n"; } for (int i=1;i<=n;i++) cout<