# coding: utf-8 T=int(input()) for t in range(T): N=int(input()) S="ABAC"+"ABC"*(N-2)+"BC" print(S)