for _ in range(int(input())): n = int(input()) ans = 'AB' + 'ACB' * (n - 1) + 'C' print(ans)