for _ in range(int(input())): n = int(input()) S = "ABACBC" S += "ABC" * (n - 2) print(S)