t = int(input()) for _ in range(t): n = int(input()) result = 'ABC' * n + 'ABA' * n + 'CAC' print(result)