def main(): t = int(input()) for i in range(t): n = int(input()) print('ABACBC' + 'ABC'*(n-2)) if __name__ == '__main__': main()