T = int(input()) S = "ABACBC" for _ in range(T): N = int(input()) ans = [] for i in range(N//2): ans.append(S) if N%2 == 1: ans.append("ABC") ans = "".join(ans) print(ans)