import java.util.HashSet;
import java.util.TreeSet;

import ru.ifmo.testlib.Checker;
import ru.ifmo.testlib.InStream;
import ru.ifmo.testlib.Outcome;
import ru.ifmo.testlib.Outcome.Type;

public class Check implements Checker {

	@Override
	public Outcome test(InStream inf, InStream ouf, InStream ans) {
		int n = inf.nextInt();
		int[] x = new int[n];
		int[] y = new int[n];
		for (int i = 0; i < n; i++) {
			x[i] = inf.nextInt();
			y[i] = inf.nextInt();
		}
		int m = ouf.nextInt();
		if (m > n - 1) {
			return new Outcome(Type.WA, "Too many lines");
		}
		if (m < 0) {
			return new Outcome(Type.WA, "Bad count of lines");
		}
		TreeSet<Integer> xDivide = new TreeSet<>();
		TreeSet<Integer> yDivide = new TreeSet<>();
		int max = 2 * (int) 1e+9;
		for (int i = 0; i < m; i++) {
			String s = ouf.nextToken().toLowerCase();
			int val = ouf.nextInt();
			if (val < -max || val > max) {
				return new Outcome(Type.WA, "Bad line");
			}
			if (s.equals("x")) {
				if (xDivide.contains(val)) {
					return new Outcome(Type.WA, "Twice line");
				} else {
					xDivide.add(val);
				}
			} else if (s.equals("y")) {
				if (yDivide.contains(val)) {
					return new Outcome(Type.WA, "Twice line");
				} else {
					yDivide.add(val);
				}
			} else {
				return new Outcome(Type.WA, "bad output");
			}
		}
		xDivide.add(max);
		xDivide.add(-max);
		yDivide.add(max);
		yDivide.add(-max);
		HashSet<String> pos = new HashSet<>();
		for (int i = 0; i < n; i++) {
			String str = xDivide.floor(x[i]) + " " + xDivide.higher(x[i]) + " "
					+ yDivide.floor(y[i]) + " " + yDivide.higher(y[i]);
			if (pos.contains(str)) {
				return new Outcome(Type.WA, "Too many point in one cluster "+str);
			} else {
				pos.add(str);
			}
		}
		return new Outcome(Type.OK, "OK");
	}

}
