T=int(input()) for _ in range(T): N=int(input()) ans="" for _ in range(N//2): ans+="ABACBC" if N%2==1: ans+="ABC" print(ans)