t = int(input()) for _ in range(t): n = int(input()) # Create a string with the pattern 'ABC' repeated N times result = 'ABC' * n print(result)