T = int(input()) for _ in range(T): N = int(input()) ans = 'ABC'*(N-2) ans = 'ABAC'+ans+'BC' print(ans)