Problem:
 Score : 300 points    Problem Statement 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001 , but he gave them new names, as follows:   the dogs numbered 1,2,\cdots,26 were respectively given the names a , b , ..., z ;  the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names aa , ab , ac , ..., zy , zz ;  the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names aaa , aab , aac , ..., zzy , zzz ;  the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names aaaa , aaab , aaac , ..., zzzy , zzzz ;  the dogs numbered 475255,475256,\cdots were respectively given the names aaaaa , aaaab , ...;  and so on.   To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names:  a , b , ..., z , aa , ab , ..., az , ba , bb , ..., bz , ..., za , zb , ..., zz , aaa , aab , ..., aaz , aba , abb , ..., abz , ..., zzz , aaaa , ...  Now, Roger asks you:  "What is the name for the dog numbered N ?"      Constraints  N is an integer.  1 \leq N \leq 1000000000000001         Input Input is given from Standard Input in the following format:  N       Output Print the answer to Roger's question as a string consisting of lowercase English letters.        Sample Input 1 2      Sample Output 1 b       Sample Input 2 27      Sample Output 2 aa       Sample Input 3 123456789      Sample Output 3 jjddja

Solution (Python):
n=int(input())
res=""
l=[chr(i) for i in range(97,123)]
while(n>0):
    x=n%26
    if x==0:
        res+="z"
        n=n//26-1
    else:
        res+=l[x-1]
        n=n//26
print(res[::-1])

Solution (Python):
import numpy as np
import scipy.sparse as sps
import scipy.misc as spm
import collections as col
import functools as func
import itertools as ite
import fractions as frac
import math as ma
from math import cos,sin,tan,sqrt
import cmath as cma
import copy as cp
import sys
import re
import bisect as bs
sys.setrecursionlimit(10**7)
EPS = sys.float_info.epsilon
PI = np.pi; EXP = np.e; INF = np.inf
MOD = 10**9 + 7

def sinput(): return sys.stdin.readline().strip()
def iinput(): return int(sinput())
def imap(): return map(int, sinput().split())
def fmap(): return map(float, sinput().split())
def iarr(n=0):
    if n: return [0 for _ in range(n)]
    else: return list(imap())
def farr(): return list(fmap())
def sarr(n=0):
    if n: return ["" for _ in range(n)]
    else: return sinput().split()
def barr(n): return [False for _ in range(n)]
def adj(n): return [[] for _ in range(n)]

n = iinput()
ch = ["z"]+[chr(i) for i in range(ord("a"), ord("a")+25)]

ans = ""
while n>0:
    if n%26: ans = ch[n%26] + ans; n //= 26
    else: ans = ch[n%26] + ans; n //= 26; n -= 1
print(ans)

Solution (Python):
N = int(input())
namelist = []
num2alpha = lambda c: chr(c+64)
for i in range(20):
    if N <= 26:
        namelist.append(num2alpha(N))
        break
    
    if  N % 26 == 0:
        namelist.append('z')
        N = (N//26)-1
    else:
        mod = N%26
        namelist.append(num2alpha(mod))
        N = (N//26)
    
while '' in namelist:
    namelist.remove('')
namelist.reverse()
ans = ''.join(namelist)

print(ans.lower())

Solution (Python):
n = int(input())
s = "abcdefghijklmnopqrstuvwxyz"

l = [26]
for i in range(2, 14):
    a = 26 ** (i) + l[i-2]
    l.append(a)

idx = 0
while True:
    if n <= l[idx]:
        break
    idx += 1

if idx == 0:
    print(s[n-1])
    exit()

q = n - l[idx-1] - 1

ll = []
for j in range(idx+1):
    q, mod = divmod(q, 26)
    ll.append(mod)

ll.reverse()
ans = ""
for e in ll:
    ans += s[e]

print(ans)

Solution (Python):
from collections import deque
n = int(input())
stack = deque()
ans =[]
while n > 0:
    if 1<= n <= 26:
        stack.append(n)
        break
    mod = n%26
    if mod == 0:
        mod = 26
    stack.append(mod)
    if mod == 26:
        n = (n//26) - 1
    else:
        n = n//26
while stack:
    tmp = stack.pop()
    alp = chr(tmp+96)
    ans.append(alp)
anss = ''.join(ans)
print(anss)

Solution (Python):
n = int(input())
str = ""

one = False
while n > 0:
    mod_c = (n-1) % 26
    chr_n = (mod_c + 97)
    str = chr(chr_n) + str
    n = n-mod_c+1
    if n == 26:
        break
    n = int(n / 26)

print(str)

Solution (Python):
a=int(input())
s=0
d=1
si=[]
while a>0:
    b=a%26
    si.append(b)
    a=a//26
    if b==0:
      a-=1
    
    
 
c=""
for i in si:
  if i==0:
    i=26
  c+=chr(i+96)
c=c[::-1]
print(c)

Solution (Python):
N = int(input())
a = 26
counter = 1
while a<N:
  N -= a
  counter += 1
  a *= 26
ans = []
N -= 1
while N>=26:
  ans.append(N%26)
  N = N //26
ans.append(N)
dic = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]
ans = [dic[i] for i in ans[::-1]]
n = len(ans)
print("a"*(counter-n) + "".join(ans))

Solution (Python):


abc=[chr(i) for i in range(97,123)]

N=int(input())



ans=""

L=0
for i in range(1,12):
    if N >= 26**i:
        N-=26**i
    else:
        L=i
        break


if N==0:
    for i in range(L-1):
        ans+="z"
else:
    for i in range(L,1,-1):
        if N <= 26**(i-1):
            ans+="a"
        else:        
            for j in range(1,26):
                if 26**(i-1)*j < N and 26**(i-1)*(j+1) >= N:
                    ans+=abc[j]
                    N-=26**(i-1)*j
                    break
    ans+=abc[N-1]
print(ans)

"""
re=0
L=len(ans)
for i in range(L):
    ind=abc.index(ans[L-i-1])+1
    re+=ind*26**i

print(re)

if n!=re:
    print(n)
    break
"""

Solution (Python):















mod = int(1e9+7)

INF = 1<<50

def readInt():
    return list(map(int,input().split()))

def main():
    n = int(input())
    s = []
    while n!=0:
        if n<=26:
            s.append(n)
            n = 0
        else:
            x = n % 26
            if x==0:
                x = 26
            s.append(x)
            n = (n-1) // 26
    t = []
    for i in range(len(s)-1,-1,-1):
        t.append(chr(s[i]+96))
    print(''.join(t))
    return

if __name__=='__main__':
    main()

Solution (Python):
n = int(input())

ans = ""

al = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
      'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']

while n > 0:
    tmp = n % 26
    if tmp > 0:
        ans += al[tmp-1]
    else:
        ans += 'z'
        n = n - 1
    n = n // 26

print(ans[::-1])

Solution (Python):
n = int(input())

keta = 1
for i in range(1, 18):
    t = 26*(26**i-1)//25
    if n <= t:
        break
    else:
        keta += 1

n -= 26*(26**(keta-1)-1)//25
n -= 1

ans = ""
for i in range(keta):
    t = 26**i
    ans = chr(ord('a')+(n//t)%26)+ans
print(ans)

Solution (Python):
if __name__ == "__main__":
    n = int(input().strip())
 
    chars = "abcdefghijklmnopqrstuvwxyz"
    ans = []
 
    while True:
        if n < 27:
            ans.append(chars[n - 1])
            break
 
        else:
            remainder = int(n % 26)
            n = int(n / 26)
            if remainder > 0:
                ans.append(chars[remainder - 1])
            else:
                ans.append(chars[-1])
                n -= 1
 
        
    print("".join(ans[::-1]))

Solution (Python):
import sys
import math

N = int(input())
ALPHABET = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]
result = []

def alphabet_decimal(v):
    quotient = math.floor(v / len(ALPHABET))
    surplus = v % len(ALPHABET)
    quotient -= 1 if surplus == 0 else 0
    surplus = len(ALPHABET) if surplus == 0 else surplus
    result.append(surplus)
    if len(ALPHABET) < quotient:
        alphabet_decimal(quotient)
    elif len(ALPHABET) < v:
        result.append(quotient)
    return "".join([ALPHABET[i - 1] for i in reversed(result)])

print(alphabet_decimal(N).lower())

Solution (Python):
N=int(input())
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)

print(num2alpha(N).lower())

Solution (Python):
N = int(input())
ABC = ["a", "b", "c", "d", "e", "f","g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z" ]
count = []
i = 1
keta = 0
while True:
    if N< 26*(26**i-1)/25:
        keta = i
        break
    else:
        i+=1
n = keta-1
bann = N-26*(26**n-1)/25

if bann ==0:
    ans2 = []
    for i in range(keta-1):
        ans2.append("z")
    print("".join(ans2))
    
    
else:
    
    bann-=1
    ans1 = []
    while True:
        a = bann//26
        b = bann % 26
        ans1.append(b)
        
        if a<26:
            if a!=0:
                ans1.append(a)
            break

        bann=a
    
    while len(ans1)<keta:
        ans1.append(0)
    ans2 = []
    
    for i in reversed(ans1):
        ans2.append(ABC[int(i)])
    print("".join(ans2))

Solution (Python):
def base_convert(nl, ibase, obase):
    o = []
    while any(nl):
        c = 0
        for i in range(len(nl)):
            c = c * ibase + nl[i]
            nl[i],c = divmod(c,obase)
        o.append(c)
    o.reverse()
    return o

def convertList(lst):
    rev_lst = list(reversed(lst))
    for i,num in enumerate(rev_lst):
        if i < len(rev_lst)-1:
            if num <= 0:
                rev_lst[i+1] = rev_lst[i+1]-1
                rev_lst[i] = rev_lst[i] + 26
    return list(reversed(rev_lst))

dict1 = {
    0: '',
    1: 'a',
    2: 'b',
    3: 'c',
    4: 'd',
    5: 'e',
    6: 'f',
    7: 'g',
    8: 'h',
    9: 'i',
    10: 'j',
    11: 'k',
    12: 'l',
    13: 'm',
    14: 'n',
    15: 'o',
    16: 'p',
    17: 'q',
    18: 'r',
    19: 's',
    20: 't',
    21: 'u',
    22: 'v',
    23: 'w',
    24: 'x',
    25: 'y',
    26: 'z'
}

N = input()
N = list(map(int,[i for i in N]))
lst = base_convert(N,10,26)
lst_converted = convertList(lst)
ans = ''.join([dict1[i] for i in lst_converted])
print(ans)

Solution (Python):
n = int(input())

name_len = [0]
while True:
  name_len.append(name_len[-1]+26**(len(name_len)))
  if name_len[-1] > 1000000000000001:
    break



number = 0
for i in range(len(name_len)):
  if name_len[i] < n and n <= name_len[i+1]:
    number = i+1
    break



n -= name_len[number-1]


ans = ""
li = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']


for i in range(number,0,-1):
  
  
  
  if i == 1:
    ans += li[int(n / 26**(i-1))-1]
  else:
    if n%26**(i-1) == 0:
      ans += li[int(n / 26**(i-1))-1]
    else:
      ans += li[int(n / 26**(i-1))]
  n = n% 26**(i-1)

print(ans)

Solution (Python):
N=int(input())


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)
      
ans=num2alpha(N)

print(ans.lower())

Solution (Python):
n = int(input())
s = ""
a = "zabcdefghijklmnopqrstuvwxyz"
while n > 0:
    k = n % 26
    s += a[k]
    n //= 26
    if k == 0:
        n -= 1
print(s[::-1])

Solution (Python):
n = int(input().rstrip())

num = []
while True:
    sho = n // 26
    amari = n % 26
    if amari == 0:
        amari = 26
        sho = n // 26 - 1

    num.append(amari)
    if sho == 0:
        break
    n = sho

num.reverse()

ans = ''
for i in num:
    ans += chr(i - 1 + ord('a'))

print(ans)

Solution (Python):
n = int(input())
def printname(n):
  if n<=26:
    return chr(96+n)
  elif n%26==0:
    return printname(n//26-1)+chr(122)
  else:
    return printname(n//26)+chr(96+n%26)
print(printname(n))

Solution (Python):
def main():
    a = int(input())
    ans = num2alpha(a)
    print(ans)

def num2alpha(num):
    if num<=26:
        return chr(96+num)
    elif num%26==0:
        return num2alpha(num//26-1)+chr(122)
    else:
        return num2alpha(num//26)+chr(96+num%26)
        
if __name__ == '__main__':
    main()

Solution (Python):
def moji(x):
    return chr(x + 96)

n = int(input())
s = ""

cnt = 0
a = 26
i = 1

while(1):
    if n <= a:
        cnt = i
        break
    i += 1
    a = 26 ** i + a



for i in range(1, cnt+1):
    if i != 1:
        n = n - (26**(i-1))
    if i == 1:
        k = n % 26
        if k == 0:
            k = 26
        s += moji(k)
    else:
        if n %  (26 ** (i-1)) == 0:
            k = (n // (26 ** (i-1))) % 26
        else:
            k = (n // (26 ** (i-1))) % 26 + 1
        if k == 0:
            k = 26
        s += moji(k)

print(s[::-1])

Solution (Python):
n = int(input())
ans = []

s = 0
while 1:
    if s == 1 and n < 1:
        break
    s = 1
    if n%26 == 0:
        ans.append(0)
    else:
        ans.append(n%26)
    n -= n%26
    n = n//26
for i in range(len(ans)):
    if i != len(ans)-1:
        if ans[i] <= 0:
            ans[i+1] -= 1
            ans[i] += 26
    else:
        if ans[i] <= 0:
            del ans[i]
ans = ans[::-1]
for i in range(len(ans)):
    print(chr(96+ans[i]),end="")
print("")

Solution (Python):
n = int(input())
data = [26 ** x for x in range(1, 12)]

d = 0
r = 0
for i in range(len(data)):
    if n <= d + data[i]:
        r = i+1
        n -= (d + 1)
        break
    
    d += data[i]

kurai = [26 **  x for x in range(r)][::-1]
ans = [0] * r
for i in range(r):
    ans[i]= min(n // kurai[i], 25)
    n -= kurai[i] * ans[i]

alpha = [chr(i) for i in range(97, 97+26)] 
ans = [alpha[a] for a in ans]
print("".join(ans))

Solution (Python):
import math
N = int(input())

if N <= 26:
    M00 = [N]
else:
    l = 1
    M = N
    M0 = []
    while(M>0):
        M -= 26**l
        M0.append(M)
        l+=1

    MM = M0[l-3]-1

    cnt = l-1

    M00 = []
    while(cnt>=1):
        
        a = math.floor(MM/26**(cnt-1))
        M00.append(a+1)
        MM -= a*26**(cnt-1)
        
        cnt -= 1
    

str0 = []
for i in range(len(M00)):
    str0.append(chr(M00[i]+96))
    
print(''.join(str0))

Solution (Python):
if __name__ == '__main__':
    a = int(input())
    list=[]
    b=0
    for i in range(11):
        b+=26**(i+1)
        list.append(b)

    count = 0
    for i in range(11):
        if a <= list[i]:
            count = i+1
            break
    ans=""
    for i in range(count):
        c = a % 26
        a = a // 26
        if c == 0:
            c=26
            a-=1
        ans= chr(96 + c) +ans

        if a == 0:
            break

    print(ans)

Solution (Python):
n=int(input())

alphabet=[None] + [chr(i) for i in range(97,97+26)]

rest=[]
while n!=0:
    rest.append(n%26)
    n = n // 26
rest.reverse()

for i in range(len(rest)-1):
    if rest[len(rest)-1-i]<=0:
        rest[len(rest)-1-i]+=26
        rest[len(rest)-2-i]-=1
if rest[0]<=0:
    rest=rest[1:]

ans=''
for i in range(len(rest)):
    ans+=alphabet[rest[i]]
print(ans)

Solution (Python):
def num2alpha(num):
    if num<=26:
        return chr(96+num)
    elif num%26==0:
        return num2alpha(num//26-1)+chr(122)
    else:
        return num2alpha(num//26)+chr(96+num%26)

N = int(input())

print(num2alpha(N))

Solution (Python):
alphabet='abcdefghijklmnopqrstuvwxyz'
N=int(input())
r=[]
while N>26:    
  x=N%26
  N=N//26
  if x==0:
    N-=1
    x=26
  r.append(x)
r.append(N)
name=[alphabet[i-1] for i in r]
name.reverse()
name=''.join(name)
print(name)

Solution (Python):
s=int(input())

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)
      
print(num2alpha(s).lower())

Solution (Python):
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    n = int(readline())
    chars = "abcdefghijklmnopqrstuvwxyz"
    res = ""

    for i in range(1, 100):
        x = n % 26
        if x == 0:
            x = 26
        res += chars[x - 1]
        n -= x
        n //= 26
        if n == 0:
            break

    print(res[::-1])

if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
def dal_name(N):
    dal = ""
    while N > 0:
        N, remainder = divmod(N - 1, 26)
        dal = chr(97 + remainder) + dal
    return dal

print(dal_name(N))

Solution (Python):
n = int(input())
a = 'abcdefghijklmnopqrstuvwxyz'

ans = ''

while n > 0:
    
    i = (n-1)%26
    n = (n-1)//26
    ans = a[i] + ans
    


print(ans)

Solution (Python):


  
MAX = 50
  


def printString(n): 
  
    
    string = [" "] * MAX
  
    
    i = 0
  
    while n > 0: 
        
        rem = n % 26
  
        
        
        if rem == 0: 
            string[i] = 'Z'
            i += 1
            n = (n // 26) - 1
        else: 
            string[i] = chr((rem - 1) + ord('a')) 
            i += 1
            n = n // 26
    string[i] = ' '
  
    
    string = string[::-1] 
    return(string)

T = printString(int(input()))
V = [t.lower() for t in T if t != " "]
print("".join(V))

Solution (Python):
n = int(input())


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)


print(num2alpha(n).lower())

Solution (Python):
N = int(input())
b = 96
ans = ""
while N > 0:
  r = N % 26
  if r == 0:
    ans = "z" + ans
  else:
    ans = chr(b + r) + ans
  if N % 26 == 0:
    N = N // 26  -1
  else:
    N = N // 26
print(ans)

Solution (Python):
n = int(input())
s='zabcdefghijklmnopqrstuvwxy'

answer = []
i = 1
while n > 0:
  x = n % 26
  if x >0:
  	n = n // 26
  else:
    n = n // 26 -1
  answer.append(s[x])
print(''.join(answer[::-1]))

Solution (Python):
N = int(input())

result = ''
ALPHABET = 'zabcdefghijklmnopqrstuvwxy'

while N > 0:
    N, n = divmod(N, 26)
    result = ALPHABET[n] + result
    if n == 0:
        N -= 1

print(result)

Solution (Python):








import sys

N = int(sys.stdin.readline())


def Base_10_to_n(X, n):
    m = chr(X%n+ord("a"))
    if (X//n):
        return Base_10_to_n(X//n-1, n)+m
    return m

print(Base_10_to_n(N-1,26))

Solution (Python):
import math
N = int(input())-1
ans = []

while(N>=26):
    ans.append(chr(ord("a")+(N%26)))
    N = (N-26)//26
ans.append(chr(ord("a")+(N%26)))
print("".join(ans[::-1]))

Solution (Python):
def func(n, lf):
    cnt = 0
    if lf > 0:
        dif = alp[lf] - alp[lf-1]
    else:
        dif = 1
    while n > dif:
        n -= dif
        cnt += 1
    return n, cnt

N = int(input())

sam = [chr(i) for i in range(97, 97+26)]

alp = []
alp.append(0)
num = 26
i = 1
while num <= 1000000000000001:
    alp.append(num)
    i += 1
    num += 26 ** i



ans = ''
l = len(alp) - 1

while 1:
    if N - alp[l] > 0:
        break
    l -= 1



N = N - alp[l]

while l >= 0:
    ret = func(N, l)
    ans = ans + sam[ret[1]]
    N = ret[0]
    l -= 1

print(ans)

Solution (Python):
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(input())

s = num2alpha(n)
print(s.lower())

Solution (Python):
N = int(input())
n = N
l = []
while True:
    a = n%26 if n % 26 != 0 else 26
    n = n // 26 - 1 if n % 26 == 0 else n // 26
    l.append(a)
    if n == 0:
        break
l.reverse()
print(*[chr(ans+96) for ans in l], sep='')

Solution (Python):
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.buffer.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.buffer.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

n = ri() - 1
li = []
while n >= 26:
  a = n%26
  li.append(a)
  n //= 26
  n -= 1
li.append(n)  
li.reverse()
ans = ''
for i in li:
  s = 'abcdefghijklmnopqrstuvwxyz'[i]
  ans += s
print(ans)

Solution (Python):
import math

alphabets = [chr(i) for i in range(97, 97+26)]

N = int(input())

def run(n):
    a = 0
    for i in range(1, 12):
        if math.pow(26, i) >= n:
            break
        n -= int(math.pow(26, i))

    ans = ''
    for j in range(i-1):
        b = n // int(math.pow(26, i-j-1))
        amari = n % int(math.pow(26, i-j-1))
        if amari == 0:
            b -= 1
        ans += alphabets[b]
        n = n % int(math.pow(26, i-j-1))
    ans += alphabets[n-1]
    return ans
    
print(run(N))

Solution (Python):
def resolve():
    N = int(input())
    alp = "zabcdefghijklmnopqrstuvwxy"
    ans = ""
    tmp = N
    while tmp > 0:
        ama = tmp%26
        tmp = (tmp-1)//26
        ans = alp[ama] + ans
    print(ans)


resolve()

Solution (Python):
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(input())
print(num2alpha(n).lower())

Solution (Python):



import sys
from collections import deque

s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in list(ss)]
ss2nnn = lambda ss: [s2nn(s) for s in list(ss)]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [i2s() for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main():
    N = i2n()
    a = 'abcdefghijklmnopqrstuvwxyz'
    t = 0
    r = deque([]) 
    for i in range(15):
        N -= 26**i
        if N < 0:
            break
        r.appendleft(a[N // 26**i % 26])
    print(''.join(r))
    return

main()

Solution (Python):
n=int(input())
alpha=[chr(i) for i in range(97, 97+26)]
def calc(x):
  if x//26>0:
    return calc(x//26-1) + str(x%26).zfill(2)
  return str(x%26).zfill(2)
wk=calc(n-1)
ans=""
for i in range(0,len(wk),2):
  ans+=alpha[int(wk[i:i+2])]
print(ans)

Solution (Python):
abc = [chr(ord('a') + i) for i in range(26)] 
def n2a(n):
    if n <= 26:
        return abc[n - 1]
    elif n % 26 == 0:
        return n2a(n // 26 - 1) + abc[25]
    else:
        return n2a(n // 26) + abc[n % 26 - 1]

n = int(input())
print(n2a(n))

Solution (Python):
n = int(input())
def nume(num):
    if num<=26:
        return chr(96+num)
    elif num%26==0:
        return nume(num//26-1)+chr(122)
    else:
        return nume(num//26)+chr(96+num%26)
print(nume(n))

Solution (Python):
N = int(input())

ans=''
while True:
  n = (N-1)%26
  ans = chr(n+64+1) + ans
  N = (N-1)//26
  if N == 0: break

print(ans.lower())

Solution (Python):
n= (int)(input())
ans = ""
count = 0

if n % 26 != 0:
    ans += chr(n % 26 + 96)
    n -= n % 26
else:
    ans += 'z'
    n -= 26

for i in range(1, 11):
    n = n // 26
    if n == 0:
        break
    if n % 26 != 0:
        ans = chr(n % 26 + 96) + ans
        n -= n % 26
    else:
        ans = 'z' + ans
        n -= 26
    
print(ans)

Solution (Python):
l = ["z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y"]
l2 = [0]*11

n = int(input())
for i in range(11):
  p = 0
  q = 0
  p = n%26
  if n==0 and p==0:
    l2[i]=""
  else:
    l2[i]=l[p]
    if p ==0:
      q = n - 26
    else:
      q = n - p
    n = q//26
print(l2[10]+l2[9]+l2[8]+l2[7]+l2[6]+l2[5]+l2[4]+l2[3]+l2[2]+l2[1]+l2[0])

Solution (Python):
n = int(input())
n_new = n
out = []
while n_new > 0:
  if n_new <= 26:
    out.insert(0, str(n_new))
    break
  if n_new % 26 == 0:
    out.insert(0, str(26))
    n_new = int((n_new / 26) - 1)
  else:
    out.insert(0, str(n_new % 26))
    n_new = int(n_new / 26)
ans = ''
for i in out:
  ans = ans + chr(64 + int(i))
print(ans.lower())

Solution (Python):
n = int(input())
name = ''
while n != 0:
    tmp = n%26
    n //= 26
    if tmp == 0:
        tmp = 26
        n -= 1
    name += chr(ord('a')+tmp-1)
print(name[::-1])

Solution (Python):
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(input())
print(num2alpha(N).lower())

Solution (Python):
A = int(input())

alp = [chr(i) for i in range(97, 97+26)]

def Base_10_to_n_alp(X, n):
    X = X-1
    if (int(X/n)):
        return Base_10_to_n_alp(int(X/n), n)+alp[X%n]
    return alp[X%n]

print(Base_10_to_n_alp(A,26))

Solution (Python):
n = int(input())
s = 'abcdefghijklmnopqrstuvwxyz'
ans = ''
while n > 0:
    n -= 1
    q, r = divmod(n, 26)
    ans += s[r]
    n = q
print(ans[::-1])

Solution (Python):
import sys
import math

ALPHABET = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]
result = []

def alphabet_decimal(v):
    quotient = math.floor(v / len(ALPHABET))
    surplus = v % len(ALPHABET)
    quotient -= 1 if surplus == 0 else 0
    surplus = len(ALPHABET) if surplus == 0 else surplus
    result.append(surplus)
    if len(ALPHABET) < quotient:
        alphabet_decimal(quotient)
    elif len(ALPHABET) < v:
        result.append(quotient)
    return "".join([ALPHABET[i - 1] for i in reversed(result)])

N = input()
ans = alphabet_decimal(int(N))
print(ans.lower())

Solution (Python):
n = int(input())
res = ""
while n > 0:
  n, rem = divmod(n - 1, 26)
  res = chr(97 + rem) + res

print(res)

Solution (Python):
from decimal import Decimal

N = int(input())
wordlist = [chr(i) for i in range(97, 97+26)]
ans=[]

while True:
    tmp = Decimal(N) % Decimal(26)
    N = Decimal(N) // Decimal(26)

    if tmp==0:
        N-=1

    ans.insert(0, wordlist[int(tmp-1)])

    if N == 0:
        break

print(*ans, sep='')

Solution (Python):
n = int(input())

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

print(num2alpha(n))

Solution (Python):
from string import ascii_lowercase as lc
from bisect import bisect_left

keta = [
  26,
  702,
  18278,
  475254,
  12356630,
  321272406,
  8353082582,
  217180147158,
  5646683826134,
  146813779479510,
  3817158266467286
]

n = int(input())
if n <= 26:
    print(lc[n-1])
    exit(0)
    
name = []
ind = bisect_left(keta, n)
n -= keta[ind-1] + 1
for i in range(ind):
    rem  = n % 26
    name.append(rem)
    n //= 26
name.append(n)
name.reverse()

print(''.join(lc[i] for i in name))

Solution (Python):
def main():
    n = int(input())
    A = list("zabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz")
    beki = [0, 26, 702, 18278, 475254, 12356630, 321272406, 8353082582, 217180147158, 5646683826134, 146813779479510, 3817158266467286]

    ika = 0
    for i in range(12):
        if n <= beki[i]:
            ika = i
            ran = n - beki[i-1]
            break

    t = ['']*ika
    for i in range(ika)[::-1]:
        d,m = divmod(ran,26)
        t[i] = A[m]
        ran = d
        if m != 0:
            ran += 1


    print(''.join(t))

if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())

cnt = 1
a = ord("a")
while True:
    if N <= 26**cnt:
        N -= 1
        ans = []
        while 0 < N:
            ans.append(N%26)
            N //= 26
        print("a"*(cnt-len(ans)),end="")
        for i in range(len(ans)-1,-1,-1):
            print(chr(a+ans[i]),end="")
        print()
        break
    else:
        N -= 26**cnt
        cnt += 1

Solution (Python):
n= int(input())-1
 
alp=list([
    "a","b","c","d","e",
    "f","g","h","i","j",
    "k","l","m","n","o",
    "p","q","r","s","t",
    "u","v","w","x","y","z"
          ])
 
answer=""
while True:
    answer=alp[n%26]+answer
    if n<26:
        break
    n=n//26-1
 
print(answer)

Solution (Python):
def n2a(num):
  if num <= 26:
    return chr(ord("a")+num-1)
  elif num % 26 == 0:
    return n2a(num//26 - 1) + chr(ord("z"))
  else:
    return n2a(num//26) + chr(ord("a")-1 + num%26)
    


N = int(input())

print(n2a(N))

Solution (Python):
n = int(input())
ans = ""
while n > 0:
    n, remainder = divmod(n - 1, 26)
    ans = chr(65 + remainder) + ans
print(ans.lower())

Solution (Python):
import string

def run(n):
    '''
    '''
    _base_array = string.ascii_lowercase
    results = []
    while n > 0:
        results.append(_base_array[n%26 - 1])
        if n%26 == 0:
            n = n//26 - 1
            continue
        n = n//26

    print(''.join(results[::-1]))



if __name__ == '__main__':
    n = int(input())
    run(n)

Solution (Python):
from math import floor
alphabets = ["_","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y"]
n=int(input())
res = ""
i=10
while i>-1:
    divres = floor(n/(26**i))
    res += alphabets[divres]
    n-= divres * (26 ** i)
    i-=1
while res[0]=="_":
    res = res[1:]


i=len(res)-1
while i>-1:
    if res[i] == "_":
        j=0
        while res[i-j] == "_":
            j+=1
        if i == 0:
            res = res[1:]
        else:
            res = res[:i-j] + alphabets[alphabets.index(res[i-j])-1] + "y"*(j-1) + "z" + res[i+1:]
    i-=1
print(res)

Solution (Python):
n = int(input())
res = ""



c = 0
while True:
    n -= 26 ** c
    if n < 0:
        break
    ch = (n % (26 ** (c+1))) // (26 ** c)
    
    res += chr(ord("a") + ch)
    c += 1

print(res[::-1])

Solution (Python):
from string import ascii_lowercase

n = int(input())
l = []
while n:
  d, r = divmod(n, 26)
  l.append(ascii_lowercase[r-1])
  n = d
  if r == 0:
    n -= 1

l.reverse()
print(*l, sep="")

Solution (Python):
N = int(input())

first_idx = 1
last_idx = 26
cnt = 1
while N > last_idx:
    first_idx = last_idx + 1
    last_idx = 26 * (1 + last_idx)
    cnt += 1


idx = N - first_idx

ans = ""
for i in range(cnt):
    rem = idx % 26
    idx = idx // 26
    ans = chr(97 + rem) + ans

print(ans)

Solution (Python):
import math
import sys

N = int(input()) - 1
m = 0
i = 1
while True:
  m += 26 ** i
  if N < m:
    break
  i += 1
digit = i
N = N - (m - 26 ** i)

name = ''
for i in range(digit):
  c = chr(97+(26 + N) % 26)
  name += c
  N //= 26
print(name[::-1])

Solution (Python):
N = int(input())
name = ''
div = 26
while(N > 0):
    N, mod = divmod(N, div)
    if mod == 0:
        mod = 26
        N -= 1
    atoz = chr(mod+96)
    
    atoz += name
    name = atoz
print(name)

Solution (Python):
borders = []
n = 0
for i in range(1, 12):
    n += 26 ** i
    borders.append(n)
borders.sort(reverse=True)
chars = [chr(97 + i) for i in range(26)]

N = n = int(open(0).read())
keta = {}
for i, b in enumerate(borders):
    j = 0
    k = 26 ** (11 - i)
    while n > b:
        n -= k
        j += 1
    if j > 0:
        keta[11 - i] = chars[j - 1]
if n > 0:
    keta[0] = chars[n - 1]
ret = [keta[i] if i in keta else '_' for i in range(12, -1, -1)]
print("".join(ret[12 - max(keta.keys()):]))

Solution (Python):
n = int(input())
eigo = 'abcdefghijklmnopqrstuvwxyz'

keta = 1
j = 1
while n > 26**j:
    n -= 26**j
    keta += 1
    j += 1

n = n-1
ans =''

while keta != 0:
    a = n //(26**(keta-1))
    if a != 0:
        n = n -(26**(keta-1)*a)
        ans += eigo[a]
    else:
        ans+= eigo[0]
    keta -= 1

print(ans)

Solution (Python):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  

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 = ni()

print(num2alpha(n).lower())