#include <bits/stdc++.h>
using namespace std;
int xm, ym, zm;
int N, M, K;
const int INF = 1e9;
const int MAXN = 100010;
int ans[MAXN];
struct point {
  int x, y, z;
  int num, type;
  int sign;
  point() {}
  point(int _x, int _y, int _z, int _num, int _type, int _sign) {
    x = _x;
    y = _y;
    z = _z;
    num = _num;
    type = _type;
    sign = _sign;
  }
} p[MAXN * 9], tmp_p[MAXN * 20];
int cnt = 0;
void gao(int x1, int x2, int y1, int y2, int z1, int z2, int x, int y, int z,
         int nn) {
  x1 = min(x1, x);
  x2 = max(x2, x);
  y1 = min(y1, y);
  y2 = max(y2, y);
  z1 = min(z1, z);
  z2 = max(z2, z);
  for (int i = 0; i < 2; i++)
    for (int j = 0; j < 2; j++)
      for (int k = 0; k < 2; k++) {
        int nx = i == 0 ? x1 - 1 : x2;
        int ny = j == 0 ? y1 - 1 : y2;
        int nz = k == 0 ? z1 - 1 : z2;
        p[++cnt] = point(nx, ny, nz, nn, 1, (i ^ j ^ k) ? 1 : -1);
      }
}
bool cmpx(point a, point b) {
  if (a.x == b.x) return a.type < b.type;
  return a.x < b.x;
}
bool cmpy(point a, point b) {
  if (a.y == b.y) return a.type < b.type;
  return a.y < b.y;
}
int T[MAXN];
int lowbit(int x) { return x & -x; }
int getsum(int x) {
  int S = 0;
  while (x) {
    S += T[x];
    x -= lowbit(x);
  }
  return S;
}
void add(int x, int y) {
  while (x <= zm) {
    T[x] += y;
    x += lowbit(x);
  }
}
void solve(int L, int R) {
  if (L == R) return;
  int mid = (L + R) / 2;
  int node1 = L, node2 = mid + 1;
  for (int i = L; i <= R; i++) tmp_p[i] = p[i];
  sort(p + L, p + mid + 1, cmpy);
  sort(p + mid + 1, p + R + 1, cmpy);
  while (node1 <= mid && node2 <= R) {
    if (p[node1].y <= p[node2].y) {
      if (p[node1].type == 0) {
        add(p[node1].z, 1);
      }
      node1++;
    } else {
      if (p[node2].type == 1) {
        ans[p[node2].num] += p[node2].sign * getsum(p[node2].z);
      }
      node2++;
    }
  }
  while (node2 <= R) {
    if (p[node2].type == 1) {
      ans[p[node2].num] += p[node2].sign * getsum(p[node2].z);
    }
    node2++;
  }
  for (int i = node1 - 1; i >= L; i--)
    if (p[i].type == 0) {
      add(p[i].z, -1);
    }
  for (int i = L; i <= R; i++) p[i] = tmp_p[i];
  solve(L, mid);
  solve(mid + 1, R);
}
int main() {
  scanf("%d%d%d", &xm, &ym, &zm);
  scanf("%d%d%d", &N, &M, &K);
  int x1, x2, y1, y2, z1, z2;
  x1 = y1 = z1 = INF;
  x2 = y2 = z2 = 0;
  for (int i = 1; i <= N; i++) {
    int x, y, z;
    scanf("%d%d%d", &x, &y, &z);
    x1 = min(x1, x);
    x2 = max(x2, x);
    y1 = min(y1, y);
    y2 = max(y2, y);
    z1 = min(z1, z);
    z2 = max(z2, z);
  }
  for (int i = 1; i <= M; i++) {
    int x, y, z;
    scanf("%d%d%d", &x, &y, &z);
    if (x >= x1 && x <= x2 && y >= y1 && y <= y2 && z >= z1 && z <= z2) {
      puts("INCORRECT");
      return 0;
    }
    p[++cnt] = point(x, y, z, i, 0, 1);
  }
  for (int i = 1; i <= K; i++) {
    int x, y, z;
    scanf("%d%d%d", &x, &y, &z);
    if (x >= x1 && x <= x2 && y >= y1 && y <= y2 && z >= z1 && z <= z2) {
      ans[i] = -1;
    } else {
      gao(x1, x2, y1, y2, z1, z2, x, y, z, i);
    }
  }
  sort(p + 1, p + cnt + 1, cmpx);
  if (cnt) solve(1, cnt);
  puts("CORRECT");
  for (int i = 1; i <= K; i++) {
    if (ans[i] == -1)
      puts("OPEN");
    else if (ans[i] > 0)
      puts("CLOSED");
    else
      puts("UNKNOWN");
  }
}
