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