def alpha2num(alpha):

    num=0

    for index, item in enumerate(list(alpha)):

        num += pow(26,len(alpha)-index-1)*(ord(item)-ord('A')+1)

    return num



def num2alpha(num):

    if num<=26:

        return chr(64+num)

    elif num%26==0:

        return num2alpha(num//26-1)+chr(90)

    else:

        return num2alpha(num//26)+chr(64+num%26)



n=int(eval(input()))



s = num2alpha(n)

print((s.lower()))
n=int(eval(input()))

chars = "Xabcdefghijklmnopqrstuvwxyz"



n_rem = n

ans = ""



while True:

    x = n_rem%26

    if x == 0:

        x = 26

    ans += chars[x]



    n_rem -= x



    if n_rem == 0:

        break



    n_rem //=26



print((ans[::-1]))

def alpha2num(alpha):
    num = 0
    for index, item in enumerate(list(alpha)):
        num += pow(26, len(alpha) - index - 1) * (ord(item) - ord("A") + 1)
    return num


def num2alpha(num):
    if num <= 26:
        return chr(64 + num)
    elif num % 26 == 0:
        return num2alpha(num // 26 - 1) + chr(90)
    else:
        return num2alpha(num // 26) + chr(64 + num % 26)


n = int(eval(input()))
s = num2alpha(n)
print((s.lower()))

n = int(eval(input()))
chars = "Xabcdefghijklmnopqrstuvwxyz"
n_rem = n
ans = ""
while True:
    x = n_rem % 26
    if x == 0:
        x = 26
    ans += chars[x]
    n_rem -= x
    if n_rem == 0:
        break
    n_rem //= 26
print((ans[::-1]))

-def alpha2num(alpha): -    num = 0 -    for index, item in enumerate(list(alpha)): -        num += pow(26, len(alpha) - index - 1) * (ord(item) - ord("A") + 1) -    return num - - -def num2alpha(num): -    if num <= 26: -        return chr(64 + num) -    elif num % 26 == 0: -        return num2alpha(num // 26 - 1) + chr(90) -    else: -        return num2alpha(num // 26) + chr(64 + num % 26) - - -s = num2alpha(n) -print((s.lower())) +chars = "Xabcdefghijklmnopqrstuvwxyz" +n_rem = n +ans = "" +while True: +    x = n_rem % 26 +    if x == 0: +        x = 26 +    ans += chars[x] +    n_rem -= x +    if n_rem == 0: +        break +    n_rem //= 26 +print((ans[::-1]))