from collections import defaultdict def solve(): N = int(input()) x_crabs = defaultdict(int) y_crabs = defaultdict(int) x_cnt, y_cnt = 0, 0 for _ in range(2 * N): X, Y, C = input().split() X = int(X) Y = int(Y) if C == "x": x_crabs[Y] += 1 x_cnt += 1 else: y_crabs[X] += 1 y_cnt += 1 if x_cnt < y_cnt: if x_cnt >= y_cnt - sum(c // 2 * 2 for c in y_crabs.values()): print("Yes") else: print("No") else: if y_cnt >= x_cnt - sum(c // 2 * 2 for c in x_crabs.values()): print("Yes") else: print("No") if __name__ == "__main__": T = int(input()) for _ in range(T): solve()