Q=int(input()) for _ in range(Q): N=int(input()) k=N//2 ans='ABACBC'*k if N%2==1: ans+='ABC' print(ans)