N = int(input()) for i in range(N): T = int(input()) print('ABC' * (T - 2) + 'ABACBC')