t = int(input()) for _ in range(t): n = int(input()) if n == 2: print('ABACBC') else: s = "ABC" * (n - 3) + "ABACABCBC" print(s)