T = int(input()) for _ in range(T): N = int(input()) s = 'ABACBC' x = 'ABC' * (N - 2) ans = s + x print(ans)