def check_conditions(S): if not set(S).issubset({'A', 'B', 'C'}): return False while 'ABC' in S: S = S.replace('ABC', '') if S != '': return False S = 'ABC' * N while 'A' in S and 'B' in S and 'C' in S: S = S.replace('A', '', 1) S = S.replace('B', '', 1) S = S.replace('C', '', 1) if S != '': return False if 'AA' in S or 'BB' in S or 'CC' in S: return False return True T = int(input()) for _ in range(T): N = int(input()) S = 'ABC' * N print(S)