for i in open(0).read().split('\n'): g,A=int(i),'ABCDEFGHIJKLMNOPQRSTUVWXYZ' n=8031810176 N='' for i in range(7):n//=len(A);N+=A[g//n%26] print(N)