/*
*/

//#pragma comment(linker, "/STACK:16777216")
#define _CRT_SECURE_NO_WARNINGS

#include <fstream>
#include <iostream>
#include <string>
#include <complex>
#include <math.h>
#include <set>
#include <vector>
#include <map>
#include <queue>
#include <stdio.h>
#include <stack>
#include <algorithm>
#include <list>
#include <ctime>
#include <memory.h>
#include <assert.h>

#define y0 sdkfaslhagaklsldk
#define y1 aasdfasdfasdf
#define yn askfhwqriuperikldjk
#define j1 assdgsdgasghsf
#define tm sdfjahlfasfh
#define lr asgasgash
#define norm asdfasdgasdgsd

#define eps 1e-9
#define M_PI 3.141592653589793
#define bs 104729
#define bsize 256

using namespace std;

const int INF = 1e9;
const int N = 100031;

int tests;
string st;

vector<string> parse(string st)
{
	vector<string> res;
	for (int i = 1; i < st.size(); i++)
	{
		if (st[i] == ' '&&st[i - 1] == ' ')
			return res;
	}
	stringstream s(st);
	string temp;
	while (s >> temp)
	{
		res.push_back(temp);
	}
	return res;
}

bool let(string st, int len)
{
	if (st.size() != len)
		return false;
	for (int i = 0; i < st.size(); i++)
	{
		if (st[i]<'A' || st[i]>'Z')
			return false;
	}
	return true;
}

bool dig(string st, int len)
{
	if (st.size() != len)
		return false;
	for (int i = 0; i < st.size(); i++)
	{
		if (st[i]<'0' || st[i]>'9')
			return false;
	}
	return true;
}

bool valid(vector<string> v)
{
	if (v.size() != 3)
		return false;
	if (!let(v[2], 3))
		return false;
	if (!let(v[0], 2))
	{
		if (v[0] != "B")
			return false;
	}
	if (!dig(v[1], 2))
	{
		if ((!dig(v[1], 3)) || (v[0] != "B"))
			return false;
	}
	return true;
}
int main(){
	//freopen("fabro.in","r",stdin);
	//freopen("fabro.out","w",stdout);
	//freopen("F:/in.txt", "r", stdin);
	//freopen("F:/output.txt", "w", stdout);
	ios_base::sync_with_stdio(0);
	//cin.tie(0);

	cin >> tests;
	getline(cin, st);
	for (; tests; --tests)
	{
		string st;
		getline(cin, st);
		vector<string> v = parse(st);
		if (valid(v))
			cout << "Correct!" << endl;
		else
			cout << "Incorrect!" << endl;
	}
	cin.get(); cin.get();
	return 0;
}