for _ in range(int(input())): N = int(input()) a = 'ABACBC' b = 'ABACABCBC' ans = '' if N % 2 == 0: ans = a * N else: ans = a * (N - 3) + b print(ans)