# https://yukicoder.me/problems/no/3622 def solve(N, xyc): x_map = {} y_map = {} for x, y, c in xyc: if c == "x": if y not in x_map: x_map[y] = 0 x_map[y] += 1 else: if x not in y_map: y_map[x] = 0 y_map[x] += 1 x_low = 0 x_high = 0 for value in x_map.values(): if value % 2 == 1: x_low += 1 x_high += value y_low = 0 y_high = 0 for value in y_map.values(): if value % 2 == 1: y_low += 1 y_high += value if y_high < x_low or x_high < y_low: return "No" else: return "Yes" def main(): T = int(input()) answers = [] for _ in range(T): N = int(input()) xyc = [] for _ in range(2 * N): x, y, c = input().split() xyc.append((int(x), int(y), c)) ans = solve(N, xyc) answers.append(ans) for ans in answers: print(ans) if __name__ == "__main__": main()