#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void read(T& x) {
  char c = getchar();
  bool f = false;
  for (x = 0; !isdigit(c); c = getchar()) {
    if (c == '-') {
      f = true;
    }
  }
  for (; isdigit(c); c = getchar()) {
    x = x * 10 + c - '0';
  }
  if (f) {
    x = -x;
  }
}
template <typename T, typename... U>
inline void read(T& x, U&... y) {
  read(x), read(y...);
}
const int N = 1e5 + 10;
int MAXX, MAXY, MAXZ, n, m, K, opt, root;
int X1, X2, X3, X4, Y1, Y2, Y3, Y4, Z1, Z2, Z3, Z4;
bool ANS;
struct Data {
  int P[3];
  bool operator<(const Data& b) const { return P[opt] < b.P[opt]; }
} st[N];
struct Node {
  int P[3], MINV[3], MAXV[3];
} tr[N];
struct K_DTree {
  int MAXV[N], ID[N], son[N][2];
  void Updata(int a, int b) {
    tr[a].MAXV[0] = max(tr[a].MAXV[0], tr[b].MAXV[0]);
    tr[a].MAXV[1] = max(tr[a].MAXV[1], tr[b].MAXV[1]);
    tr[a].MAXV[2] = max(tr[a].MAXV[2], tr[b].MAXV[2]);
    tr[a].MINV[0] = min(tr[a].MINV[0], tr[b].MINV[0]);
    tr[a].MINV[1] = min(tr[a].MINV[1], tr[b].MINV[1]);
    tr[a].MINV[2] = min(tr[a].MINV[2], tr[b].MINV[2]);
  }
  void Pushup(int rt) {
    if (son[rt][0]) Updata(rt, son[rt][0]);
    if (son[rt][1]) Updata(rt, son[rt][1]);
  }
  void Build(int& rt, int l, int r, int dep) {
    if (l > r) {
      rt = 0;
      return;
    }
    int mid = l + r >> 1;
    opt = dep % 3;
    rt = ID[mid];
    nth_element(st + l, st + mid, st + r + 1);
    tr[rt].P[0] = tr[rt].MAXV[0] = tr[rt].MINV[0] = st[mid].P[0];
    tr[rt].P[1] = tr[rt].MAXV[1] = tr[rt].MINV[1] = st[mid].P[1];
    tr[rt].P[2] = tr[rt].MAXV[2] = tr[rt].MINV[2] = st[mid].P[2];
    Build(son[rt][0], l, mid - 1, dep + 1);
    Build(son[rt][1], mid + 1, r, dep + 1);
    Pushup(rt);
  }
  bool Cover(int x1, int y1, int z1, int x2, int y2, int z2, int a, int b,
             int c, int d, int e, int f) {
    return x1 <= a && y1 <= b && z1 <= c && d <= x2 && e <= y2 && f <= z2;
  }
  bool Cross(Node t, int x1, int y1, int z1, int x2, int y2, int z2) {
    int a = t.MINV[0], b = t.MINV[1], c = t.MINV[2], d = t.MAXV[0],
        e = t.MAXV[1], f = t.MAXV[2];
    return max(a - x2, 0) + max(x1 - d, 0) + max(b - y2, 0) + max(y1 - e, 0) +
               max(c - z2, 0) + max(z1 - f, 0) ==
           0;
  }
  void Query(int rt, int x1, int y1, int z1, int x2, int y2, int z2) {
    if (ANS) return;
    if (Cover(x1, y1, z1, x2, y2, z2, tr[rt].MINV[0], tr[rt].MINV[1],
              tr[rt].MINV[2], tr[rt].MAXV[0], tr[rt].MAXV[1], tr[rt].MAXV[2])) {
      ANS = true;
      return;
    }
    if (Cover(x1, y1, z1, x2, y2, z2, tr[rt].P[0], tr[rt].P[1], tr[rt].P[2],
              tr[rt].P[0], tr[rt].P[1], tr[rt].P[2])) {
      ANS = true;
      return;
    }
    if (son[rt][0] && Cross(tr[son[rt][0]], x1, y1, z1, x2, y2, z2))
      Query(son[rt][0], x1, y1, z1, x2, y2, z2);
    if (son[rt][1] && Cross(tr[son[rt][1]], x1, y1, z1, x2, y2, z2))
      Query(son[rt][1], x1, y1, z1, x2, y2, z2);
  }
} KD;
int main() {
  read(MAXX, MAXY, MAXZ, n, m, K);
  X1 = MAXX;
  Y1 = MAXY;
  Z1 = MAXZ;
  for (int i = 1; i <= n; ++i) {
    int x, y, z;
    read(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)
    read(st[i].P[0], st[i].P[1], st[i].P[2]), KD.ID[i] = i;
  KD.Build(root, 1, m, 1);
  ANS = false;
  KD.Query(root, X1, Y1, Z1, X2, Y2, Z2);
  if (ANS) return puts("INCORRECT"), 0;
  puts("CORRECT");
  for (int i = 1; i <= K; ++i) {
    int x, y, z;
    read(x, y, z);
    X3 = X1;
    X4 = X2;
    Y3 = Y1;
    Y4 = Y2;
    Z3 = Z1;
    Z4 = Z2;
    X3 = min(X3, x);
    X4 = max(X4, x);
    Y3 = min(Y3, y);
    Y4 = max(Y4, y);
    Z3 = min(Z3, z);
    Z4 = max(Z4, z);
    if (X1 == X3 && X2 == X4 && Y1 == Y3 && Y2 == Y4 && Z1 == Z3 && Z2 == Z4)
      puts("OPEN");
    else {
      ANS = false;
      KD.Query(root, X3, Y3, Z3, X4, Y4, Z4);
      if (ANS)
        puts("CLOSED");
      else
        puts("UNKNOWN");
    }
  }
  return 0;
}
