T = int(input()) ANS5='ABDCC' ANS10='BBCCCFACAC' ANS21='ACCACCCCCCCCABACAAFFE' for _ in range(T): N = int(input()) if N%21==0: print(ANS21*(N//21)) elif N%21==5: print(ANS5+ANS21*(N//21)) elif N%21==10: print(ANS10+ANS21*(N//21)) else: print(-1)