#色々な改行で確認 I=input for t in [0]*int(I()): N=int(I()) print("ABACBC"*(N//2)+"ABC"*(N%2),end=["\n","\r","\r\n"][N%3])