rot = {"A" : "B", "B" : "C", "C" : "A"} t = int(input()) for i in range(t): n = int(input()) s = list(input()) f = 0 for i in range(n): if (s[i] != "C") ^ (i & 1) == 0: s[i] = rot[s[i]] if (i & 1 == 1 and s[i] == "B"): break else: break print(*s, sep = "")