def solve(): T = int(input().strip()) for _ in range(T): N = int(input().strip()) S = 'ABA' * N + 'C' * N print(S) solve()