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