import sys input = sys.stdin.readline T=int(input()) for tests in range(T): N=int(input()) ANS=["_"]*(3*N) for i in range(0,2*N,2): ANS[i]="A" now=0 for i in range(3*N): if ANS[i]=="_": if now==0: ANS[i]="B" else: ANS[i]="C" now^=1 print("".join(ANS))