for _ in range(int(input())):print("ABA"+"CBA"*(int(input())-2)+"CBC")