t = int(input()) for _ in range(t): n = int(input()) print('A'*n+'B'*n+'C'*n)