#include //#include #define all(v) v.begin(), v.end() #define rall(v) v.rbegin(), v.rend() #define Max(v) *max_element(all(v)) #define Min(v) *min_element(all(v)) #define yn(flag) if (flag) {cout << "Yes\n";} else {cout << "No\n";} using namespace std; //using namespace atcoder; using str = string; using ll = long long; using ld = long double; using ull = unsigned long long; using vint = vector; using vvint = vector>; using vll = vector; using vvll = vector>; using pii = pair; using pil = pair; using pli = pair; using pll = pair; //using mint = modint998244353; //using mint = modint1000000007; template inline bool chmin(T& a, T b) {if (a > b) {a = b; return true;} return false;} template inline bool chmax(T& a, T b) {if (a < b) {a = b; return true;} return false;} const ll INF = 1LL << 60; const ll mINF = -1 * INF; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); //cout << fixed << setprecision(16); int N; cin >> N; int k = N / 11; vector KCPC = {"#...#.#####", "#.##..#....", "##....#....", "#.##..#....", "#...#.#####", "...........", "####..#####", "#...#.#....", "####..#....", "#.....#....", "#.....#####"}; vector KUPC = {"#...#.#...#", "#.##..#...#", "##....#...#", "#.##..#...#", "#...#.#####", "...........", "####..#####", "#...#.#....", "####..#....", "#.....#....", "#.....#####"}; vector S(11); for (int i = 0; i < N; ++i) { str s = ""; for (int j = 0; j < N; ++j) { char c; cin >> c; if (!(j % k)) s += c; } if (!(i % k)) { S[i / k] = s; //cout << s << "\n"; } } if (S == KCPC) cout << "KCPC"; else if (S == KUPC) cout << "KUPC"; else cout << "error"; return 0; }