#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100005;
template <typename T>
inline void read(T &AKNOI) {
  T x = 0, flag = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') flag = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  AKNOI = flag * x;
}
template <typename T>
inline void cmin(T &x, T y) {
  if (x > y) x = y;
}
template <typename T>
inline void cmax(T &x, T y) {
  if (x < y) x = y;
}
int n, m, q, curD, root;
int b1[2][3], b2[2][3];
struct Node {
  int d[3], mn[3], mx[3], ch[3];
  inline void input() {
    for (int i = 0; i < 3; ++i) {
      read(d[i]);
      mn[i] = mx[i] = d[i];
    }
  }
  bool operator<(const Node &rhs) const { return d[curD] < rhs.d[curD]; }
} p[MAXN];
inline void up(int x, int y) {
  for (int i = 0; i < 3; ++i) {
    cmin(p[x].mn[i], p[y].mn[i]);
    cmax(p[x].mx[i], p[y].mx[i]);
  }
}
inline void pushup(int rt) {
  if (p[rt].ch[0]) up(rt, p[rt].ch[0]);
  if (p[rt].ch[1]) up(rt, p[rt].ch[1]);
}
int Build(int b, int e, int d) {
  if (b > e) return 0;
  int rt = (b + e) >> 1;
  curD = d;
  nth_element(p + b, p + rt, p + e + 1);
  p[rt].ch[0] = Build(b, rt - 1, (d + 1) % 3);
  p[rt].ch[1] = Build(rt + 1, e, (d + 1) % 3);
  pushup(rt);
  return rt;
}
inline bool out(int rt) {
  for (int i = 0; i < 3; ++i) {
    if (p[rt].mx[i] < b2[0][i] || b2[1][i] < p[rt].mn[i]) return 1;
  }
  return 0;
}
inline bool in(int rt) {
  for (int i = 0; i < 3; ++i) {
    if (p[rt].d[i] < b2[0][i] || b2[1][i] < p[rt].d[i]) return 0;
  }
  return 1;
}
int Query(int rt) {
  if (out(rt)) return 0;
  if (in(rt)) return 1;
  if (p[rt].ch[0] && Query(p[rt].ch[0])) return 1;
  if (p[rt].ch[1] && Query(p[rt].ch[1])) return 1;
  return 0;
}
void init() {
  read(n);
  read(n);
  read(n);
  read(n);
  read(m);
  read(q);
  memset(b1[0], 0x3f, sizeof(b1[0]));
  for (int i = 1, x; i <= n; ++i) {
    for (int j = 0; j < 3; ++j) {
      read(x);
      cmin(b1[0][j], x);
      cmax(b1[1][j], x);
    }
  }
  for (int i = 1; i <= m; ++i) {
    p[i].input();
    int chk = 0;
    for (int j = 0; j < 3; ++j) {
      chk += (b1[0][j] <= p[i].d[j] && p[i].d[j] <= b1[1][j]);
    }
    if (chk == 3) {
      puts("INCORRECT");
      exit(0);
    }
  }
  root = Build(1, m, 0);
}
void solve() {
  puts("CORRECT");
  while (q--) {
    bool in = 1;
    for (int i = 0; i < 3; ++i) {
      int x;
      read(x);
      b2[0][i] = min(x, b1[0][i]);
      b2[1][i] = max(x, b1[1][i]);
      in &= (b1[0][i] <= x && x <= b1[1][i]);
    }
    if (in)
      puts("OPEN");
    else if (Query(root))
      puts("CLOSED");
    else
      puts("UNKNOWN");
  }
}
int main() {
  init();
  solve();
  return 0;
}
