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

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']
ans = ''


if n <= 26**1:
    
    for cnt in range(26):
        if n-1 == cnt:
            ans += alphabet[cnt]
elif 26**1 < n <= 26**2 + 26**1:
    
    for cnt in range(26):
        if 26*(cnt+1) < n <= 26*(cnt+2):
            ans += alphabet[cnt]
            n -= 26*(cnt+1)
    for cnt in range(26):
        if n-1 == cnt:
            ans += alphabet[cnt]
elif 26**2 + 26**1 < n <= 26**3 + 26**2 + 26**1:
    
    for cnt in range(26):
        if (26**2)*(cnt+1) < n <= (26**2)*(cnt+2)+26:
            ans += alphabet[cnt]
            n -= (26**2)*(cnt+1)
    for cnt in range(26):
        if 26*(cnt+1) < n <= 26*(cnt+2):
            ans += alphabet[cnt]
            n -= 26*(cnt+1)
    for cnt in range(26):
        if n-1 == cnt:
            ans += alphabet[cnt]
elif 26**3 + 26**2 + 26**1 < n <= 26**4 + 26**3 + 26**2 + 26**1:
    
    for cnt in range(26):
        if (26 ** 3) * (cnt + 1) < n <= (26 ** 3) * (cnt + 2) + 26**2 + 26:
            ans += alphabet[cnt]
            n -= (26 ** 3) * (cnt + 1)
    for cnt in range(26):
        if (26 ** 2) * (cnt + 1) < n <= (26 ** 2) * (cnt + 2) + 26:
            ans += alphabet[cnt]
            n -= (26 ** 2) * (cnt + 1)
    for cnt in range(26):
        if 26 * (cnt + 1) < n <= 26 * (cnt + 2):
            ans += alphabet[cnt]
            n -= 26 * (cnt + 1)
    for cnt in range(26):
        if n - 1 == cnt:
            ans += alphabet[cnt]
elif 26**4 + 26**3 + 26**2 + 26**1 < n <= 26**5 + 26**4 + 26**3 + 26**2 + 26**1:
    
    for cnt in range(26):
        if (26 ** 4) * (cnt + 1) < n <= (26 ** 4) * (cnt + 2) + 26**3 + 26**2 + 26:
            ans += alphabet[cnt]
            n -= (26 ** 4) * (cnt + 1)
    for cnt in range(26):
        if (26 ** 3) * (cnt + 1) < n <= (26 ** 3) * (cnt + 2) + 26 ** 2 + 26:
            ans += alphabet[cnt]
            n -= (26 ** 3) * (cnt + 1)
    for cnt in range(26):
        if (26 ** 2) * (cnt + 1) < n <= (26 ** 2) * (cnt + 2) + 26:
            ans += alphabet[cnt]
            n -= (26 ** 2) * (cnt + 1)
    for cnt in range(26):
        if 26 * (cnt + 1) < n <= 26 * (cnt + 2):
            ans += alphabet[cnt]
            n -= 26 * (cnt + 1)
    for cnt in range(26):
        if n - 1 == cnt:
            ans += alphabet[cnt]
elif 26**5 + 26**4 + 26**3 + 26**2 + 26**1 < n <= 26**6 + 26**5 + 26**4 + 26**3 + 26**2 + 26**1:
    
    for cnt in range(26):
        if (26 ** 5) * (cnt + 1) < n <= (26 ** 5) * (cnt + 2) + 26**4 + 26**3 + 26**2 + 26:
            ans += alphabet[cnt]
            n -= (26 ** 5) * (cnt + 1)
    for cnt in range(26):
        if (26 ** 4) * (cnt + 1) < n <= (26 ** 4) * (cnt + 2) + 26**3 + 26**2 + 26:
            ans += alphabet[cnt]
            n -= (26 ** 4) * (cnt + 1)
    for cnt in range(26):
        if (26 ** 3) * (cnt + 1) < n <= (26 ** 3) * (cnt + 2) + 26 ** 2 + 26:
            ans += alphabet[cnt]
            n -= (26 ** 3) * (cnt + 1)
    for cnt in range(26):
        if (26 ** 2) * (cnt + 1) < n <= (26 ** 2) * (cnt + 2) + 26:
            ans += alphabet[cnt]
            n -= (26 ** 2) * (cnt + 1)
    for cnt in range(26):
        if 26 * (cnt + 1) < n <= 26 * (cnt + 2):
            ans += alphabet[cnt]
            n -= 26 * (cnt + 1)
    for cnt in range(26):
        if n - 1 == cnt:
            ans += alphabet[cnt]
elif 26**6 + 26**5 + 26**4 + 26**3 + 26**2 + 26**1 < n <= 26**7 + 26**6 + 26**5 + 26**4 + 26**3 + 26**2 + 26**1:
    
    for cnt in range(26):
        if (26 ** 6) * (cnt + 1) < n <= (26 ** 6) * (cnt + 2) + 26**5 + 26**4 + 26**3 + 26**2 + 26:
            ans += alphabet[cnt]
            n -= (26 ** 6) * (cnt + 1)
    for cnt in range(26):
        if (26 ** 5) * (cnt + 1) < n <= (26 ** 5) * (cnt + 2) + 26**4 + 26**3 + 26**2 + 26:
            ans += alphabet[cnt]
            n -= (26 ** 5) * (cnt + 1)
    for cnt in range(26):
        if (26 ** 4) * (cnt + 1) < n <= (26 ** 4) * (cnt + 2) + 26**3 + 26**2 + 26:
            ans += alphabet[cnt]
            n -= (26 ** 4) * (cnt + 1)
    for cnt in range(26):
        if (26 ** 3) * (cnt + 1) < n <= (26 ** 3) * (cnt + 2) + 26 ** 2 + 26:
            ans += alphabet[cnt]
            n -= (26 ** 3) * (cnt + 1)
    for cnt in range(26):
        if (26 ** 2) * (cnt + 1) < n <= (26 ** 2) * (cnt + 2) + 26:
            ans += alphabet[cnt]
            n -= (26 ** 2) * (cnt + 1)
    for cnt in range(26):
        if 26 * (cnt + 1) < n <= 26 * (cnt + 2):
            ans += alphabet[cnt]
            n -= 26 * (cnt + 1)
    for cnt in range(26):
        if n - 1 == cnt:
            ans += alphabet[cnt]
elif 26**7 + 26**6 + 26**5 + 26**4 + 26**3 + 26**2 + 26**1 < n <= 26**8 + 26**7 + 26**6 + 26**5 + 26**4 + 26**3 + 26**2 + 26**1:
    
    for cnt in range(26):
        if (26 ** 7) * (cnt + 1) < n <= (26 ** 7) * (cnt + 2) + 26**6 + 26**5 + 26**4 + 26**3 + 26**2 + 26:
            ans += alphabet[cnt]
            n -= (26 ** 7) * (cnt + 1)
    for cnt in range(26):
        if (26 ** 6) * (cnt + 1) < n <= (26 ** 6) * (cnt + 2) + 26**5 + 26**4 + 26**3 + 26**2 + 26:
            ans += alphabet[cnt]
            n -= (26 ** 6) * (cnt + 1)
    for cnt in range(26):
        if (26 ** 5) * (cnt + 1) < n <= (26 ** 5) * (cnt + 2) + 26**4 + 26**3 + 26**2 + 26:
            ans += alphabet[cnt]
            n -= (26 ** 5) * (cnt + 1)
    for cnt in range(26):
        if (26 ** 4) * (cnt + 1) < n <= (26 ** 4) * (cnt + 2) + 26**3 + 26**2 + 26:
            ans += alphabet[cnt]
            n -= (26 ** 4) * (cnt + 1)
    for cnt in range(26):
        if (26 ** 3) * (cnt + 1) < n <= (26 ** 3) * (cnt + 2) + 26 ** 2 + 26:
            ans += alphabet[cnt]
            n -= (26 ** 3) * (cnt + 1)
    for cnt in range(26):
        if (26 ** 2) * (cnt + 1) < n <= (26 ** 2) * (cnt + 2) + 26:
            ans += alphabet[cnt]
            n -= (26 ** 2) * (cnt + 1)
    for cnt in range(26):
        if 26 * (cnt + 1) < n <= 26 * (cnt + 2):
            ans += alphabet[cnt]
            n -= 26 * (cnt + 1)
    for cnt in range(26):
        if n - 1 == cnt:
            ans += alphabet[cnt]
elif 26**8 + 26**7 + 26**6 + 26**5 + 26**4 + 26**3 + 26**2 + 26**1 < n <= 26**9 + 26**8 + 26**7 + 26**6 + 26**5 + 26**4 + 26**3 + 26**2 + 26**1:
    
    for cnt in range(26):
        if (26 ** 8) * (cnt + 1) < n <= (26 ** 8) * (cnt + 2) + 26**7 + 26**6 + 26**5 + 26**4 + 26**3 + 26**2 + 26:
            ans += alphabet[cnt]
            n -= (26 ** 8) * (cnt + 1)
    for cnt in range(26):
        if (26 ** 7) * (cnt + 1) < n <= (26 ** 7) * (cnt + 2) + 26**6 + 26**5 + 26**4 + 26**3 + 26**2 + 26:
            ans += alphabet[cnt]
            n -= (26 ** 7) * (cnt + 1)
    for cnt in range(26):
        if (26 ** 6) * (cnt + 1) < n <= (26 ** 6) * (cnt + 2) + 26**5 + 26**4 + 26**3 + 26**2 + 26:
            ans += alphabet[cnt]
            n -= (26 ** 6) * (cnt + 1)
    for cnt in range(26):
        if (26 ** 5) * (cnt + 1) < n <= (26 ** 5) * (cnt + 2) + 26**4 + 26**3 + 26**2 + 26:
            ans += alphabet[cnt]
            n -= (26 ** 5) * (cnt + 1)
    for cnt in range(26):
        if (26 ** 4) * (cnt + 1) < n <= (26 ** 4) * (cnt + 2) + 26**3 + 26**2 + 26:
            ans += alphabet[cnt]
            n -= (26 ** 4) * (cnt + 1)
    for cnt in range(26):
        if (26 ** 3) * (cnt + 1) < n <= (26 ** 3) * (cnt + 2) + 26 ** 2 + 26:
            ans += alphabet[cnt]
            n -= (26 ** 3) * (cnt + 1)
    for cnt in range(26):
        if (26 ** 2) * (cnt + 1) < n <= (26 ** 2) * (cnt + 2) + 26:
            ans += alphabet[cnt]
            n -= (26 ** 2) * (cnt + 1)
    for cnt in range(26):
        if 26 * (cnt + 1) < n <= 26 * (cnt + 2):
            ans += alphabet[cnt]
            n -= 26 * (cnt + 1)
    for cnt in range(26):
        if n - 1 == cnt:
            ans += alphabet[cnt]
elif 26**9 + 26**8 + 26**7 + 26**6 + 26**5 + 26**4 + 26**3 + 26**2 + 26**1 < n <= 26**10 + 26**9 + 26**8 + 26**7 + 26**6 + 26**5 + 26**4 + 26**3 + 26**2 + 26**1:
    
    for cnt in range(26):
        if (26 ** 9) * (cnt + 1) < n <= (26 ** 9) * (cnt + 2) + 26**8 + 26**7 + 26**6 + 26**5 + 26**4 + 26**3 + 26**2 + 26:
            ans += alphabet[cnt]
            n -= (26 ** 9) * (cnt + 1)
    for cnt in range(26):
        if (26 ** 8) * (cnt + 1) < n <= (26 ** 8) * (cnt + 2) + 26**7 + 26**6 + 26**5 + 26**4 + 26**3 + 26**2 + 26:
            ans += alphabet[cnt]
            n -= (26 ** 8) * (cnt + 1)
    for cnt in range(26):
        if (26 ** 7) * (cnt + 1) < n <= (26 ** 7) * (cnt + 2) + 26**6 + 26**5 + 26**4 + 26**3 + 26**2 + 26:
            ans += alphabet[cnt]
            n -= (26 ** 7) * (cnt + 1)
    for cnt in range(26):
        if (26 ** 6) * (cnt + 1) < n <= (26 ** 6) * (cnt + 2) + 26**5 + 26**4 + 26**3 + 26**2 + 26:
            ans += alphabet[cnt]
            n -= (26 ** 6) * (cnt + 1)
    for cnt in range(26):
        if (26 ** 5) * (cnt + 1) < n <= (26 ** 5) * (cnt + 2) + 26**4 + 26**3 + 26**2 + 26:
            ans += alphabet[cnt]
            n -= (26 ** 5) * (cnt + 1)
    for cnt in range(26):
        if (26 ** 4) * (cnt + 1) < n <= (26 ** 4) * (cnt + 2) + 26**3 + 26**2 + 26:
            ans += alphabet[cnt]
            n -= (26 ** 4) * (cnt + 1)
    for cnt in range(26):
        if (26 ** 3) * (cnt + 1) < n <= (26 ** 3) * (cnt + 2) + 26 ** 2 + 26:
            ans += alphabet[cnt]
            n -= (26 ** 3) * (cnt + 1)
    for cnt in range(26):
        if (26 ** 2) * (cnt + 1) < n <= (26 ** 2) * (cnt + 2) + 26:
            ans += alphabet[cnt]
            n -= (26 ** 2) * (cnt + 1)
    for cnt in range(26):
        if 26 * (cnt + 1) < n <= 26 * (cnt + 2):
            ans += alphabet[cnt]
            n -= 26 * (cnt + 1)
    for cnt in range(26):
        if n - 1 == cnt:
            ans += alphabet[cnt]
elif 26**10 + 26**9 + 26**8 + 26**7 + 26**6 + 26**5 + 26**4 + 26**3 + 26**2 + 26**1 < n <= 26**11 + 26**10 + 26**9 + 26**8 + 26**7 + 26**6 + 26**5 + 26**4 + 26**3 + 26**2 + 26**1:
    
    for cnt in range(26):
        if (26 ** 10) * (cnt + 1) < n <= (26 ** 10) * (cnt + 2) + 26**9 + 26**8 + 26**7 + 26**6 + 26**5 + 26**4 + 26**3 + 26**2 + 26:
            ans += alphabet[cnt]
            n -= (26 ** 10) * (cnt + 1)
    for cnt in range(26):
        if (26 ** 9) * (cnt + 1) < n <= (26 ** 9) * (cnt + 2) + 26**8 + 26**7 + 26**6 + 26**5 + 26**4 + 26**3 + 26**2 + 26:
            ans += alphabet[cnt]
            n -= (26 ** 9) * (cnt + 1)
    for cnt in range(26):
        if (26 ** 8) * (cnt + 1) < n <= (26 ** 8) * (cnt + 2) + 26**7 + 26**6 + 26**5 + 26**4 + 26**3 + 26**2 + 26:
            ans += alphabet[cnt]
            n -= (26 ** 8) * (cnt + 1)
    for cnt in range(26):
        if (26 ** 7) * (cnt + 1) < n <= (26 ** 7) * (cnt + 2) + 26**6 + 26**5 + 26**4 + 26**3 + 26**2 + 26:
            ans += alphabet[cnt]
            n -= (26 ** 7) * (cnt + 1)
    for cnt in range(26):
        if (26 ** 6) * (cnt + 1) < n <= (26 ** 6) * (cnt + 2) + 26**5 + 26**4 + 26**3 + 26**2 + 26:
            ans += alphabet[cnt]
            n -= (26 ** 6) * (cnt + 1)
    for cnt in range(26):
        if (26 ** 5) * (cnt + 1) < n <= (26 ** 5) * (cnt + 2) + 26**4 + 26**3 + 26**2 + 26:
            ans += alphabet[cnt]
            n -= (26 ** 5) * (cnt + 1)
    for cnt in range(26):
        if (26 ** 4) * (cnt + 1) < n <= (26 ** 4) * (cnt + 2) + 26**3 + 26**2 + 26:
            ans += alphabet[cnt]
            n -= (26 ** 4) * (cnt + 1)
    for cnt in range(26):
        if (26 ** 3) * (cnt + 1) < n <= (26 ** 3) * (cnt + 2) + 26 ** 2 + 26:
            ans += alphabet[cnt]
            n -= (26 ** 3) * (cnt + 1)
    for cnt in range(26):
        if (26 ** 2) * (cnt + 1) < n <= (26 ** 2) * (cnt + 2) + 26:
            ans += alphabet[cnt]
            n -= (26 ** 2) * (cnt + 1)
    for cnt in range(26):
        if 26 * (cnt + 1) < n <= 26 * (cnt + 2):
            ans += alphabet[cnt]
            n -= 26 * (cnt + 1)
    for cnt in range(26):
        if n - 1 == cnt:
            ans += alphabet[cnt]
elif 26**11 + 26**10 + 26**9 + 26**8 + 26**7 + 26**6 + 26**5 + 26**4 + 26**3 + 26**2 + 26**1 < n <= 26**12 + 26**11 + 26**10 + 26**9 + 26**8 + 26**7 + 26**6 + 26**5 + 26**4 + 26**3 + 26**2 + 26**1:
    
    for cnt in range(26):
        if (26 ** 11) * (cnt + 1) < n <= (26 ** 11) * (cnt + 2) + 26**10 + 26**9 + 26**8 + 26**7 + 26**6 + 26**5 + 26**4 + 26**3 + 26**2 + 26:
            ans += alphabet[cnt]
            n -= (26 ** 11) * (cnt + 1)
    for cnt in range(26):
        if (26 ** 10) * (cnt + 1) < n <= (26 ** 10) * (cnt + 2) + 26**9 + 26**8 + 26**7 + 26**6 + 26**5 + 26**4 + 26**3 + 26**2 + 26:
            ans += alphabet[cnt]
            n -= (26 ** 10) * (cnt + 1)
    for cnt in range(26):
        if (26 ** 9) * (cnt + 1) < n <= (26 ** 9) * (cnt + 2) + 26**8 + 26**7 + 26**6 + 26**5 + 26**4 + 26**3 + 26**2 + 26:
            ans += alphabet[cnt]
            n -= (26 ** 9) * (cnt + 1)
    for cnt in range(26):
        if (26 ** 8) * (cnt + 1) < n <= (26 ** 8) * (cnt + 2) + 26**7 + 26**6 + 26**5 + 26**4 + 26**3 + 26**2 + 26:
            ans += alphabet[cnt]
            n -= (26 ** 8) * (cnt + 1)
    for cnt in range(26):
        if (26 ** 7) * (cnt + 1) < n <= (26 ** 7) * (cnt + 2) + 26**6 + 26**5 + 26**4 + 26**3 + 26**2 + 26:
            ans += alphabet[cnt]
            n -= (26 ** 7) * (cnt + 1)
    for cnt in range(26):
        if (26 ** 6) * (cnt + 1) < n <= (26 ** 6) * (cnt + 2) + 26**5 + 26**4 + 26**3 + 26**2 + 26:
            ans += alphabet[cnt]
            n -= (26 ** 6) * (cnt + 1)
    for cnt in range(26):
        if (26 ** 5) * (cnt + 1) < n <= (26 ** 5) * (cnt + 2) + 26**4 + 26**3 + 26**2 + 26:
            ans += alphabet[cnt]
            n -= (26 ** 5) * (cnt + 1)
    for cnt in range(26):
        if (26 ** 4) * (cnt + 1) < n <= (26 ** 4) * (cnt + 2) + 26**3 + 26**2 + 26:
            ans += alphabet[cnt]
            n -= (26 ** 4) * (cnt + 1)
    for cnt in range(26):
        if (26 ** 3) * (cnt + 1) < n <= (26 ** 3) * (cnt + 2) + 26 ** 2 + 26:
            ans += alphabet[cnt]
            n -= (26 ** 3) * (cnt + 1)
    for cnt in range(26):
        if (26 ** 2) * (cnt + 1) < n <= (26 ** 2) * (cnt + 2) + 26:
            ans += alphabet[cnt]
            n -= (26 ** 2) * (cnt + 1)
    for cnt in range(26):
        if 26 * (cnt + 1) < n <= 26 * (cnt + 2):
            ans += alphabet[cnt]
            n -= 26 * (cnt + 1)
    for cnt in range(26):
        if n - 1 == cnt:
            ans += alphabet[cnt]

print(ans)

Solution (Python):
def main():
    a = [chr(ord('a') + i) for i in range(26)]
    a.insert(0,"a")
    list = []
    num = int(input()) 

    while(num > 0):
        if(num % 26 == 0):
            list.append(26)
            num = num // 26 -1
            continue
        else:
            list.append(num % 26)
        num = num // 26

    list.reverse()

    ans = []
    for i in range(0,len(list)):
        ans.append(a[list[i]])
    print(''.join(ans))
    


if __name__ == "__main__":
    main()

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)

num = int(input())
print(num2alpha(num))

Solution (Python):
num = int(input())
k=0
ans=[]
while k<1:
    if num<=26:
        ans.append((chr(96+num)))
        k=1
    elif num%26==0:
        num=(num//26-1)
        ans.append((chr(96+26)))
    else:
        ans.append((chr(96+num%26)))
        num=(num//26)

for i in range(len(ans)-1,-1,-1):
    if i ==0:
        print(ans[i])
    else:
        print(ans[i], end="")

Solution (Python):


import sys

class COneQuadrillionAndOneDalmatians:
    def solve(self, tc=0):
        n = int(input()) - 1
        
        sz = 1
        tot = 0
        while tot <= n:
            tot += 26 ** sz
            sz += 1
        sz -= 1

        ans = ""
        for i in range(1, sz):
            n -= 26 ** i
        for i in range(sz):
            ans += chr(ord('a') + (n // (26 ** (sz - i - 1))) % 26)

        print(ans)

solver = COneQuadrillionAndOneDalmatians()
input = sys.stdin.readline

solver.solve()

Solution (Python):
n=int(input())
ans=[' ' for _ in range(11)]
ans_=[]
letter=[' ','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:
  new=n%26
  if new==0:
    new=26
    n+=-26
  ans_.append(new)  
  n=int(n/26)  
ans_=ans_[::-1]
for i in range(len(ans_)):
  ans[i]=letter[ans_[i]]
print(''.join(ans))

Solution (Python):
import sys
N=int(input())
"""
if N<=26:
  l=[]
  l.append(N)
  i=0
  print(chr(l[i]+96))
  sys.exit()
"""
def Base_10_to_n(X, n):
    X_dumy = X
    out = ''
    while X_dumy>0:
        if X_dumy%n==0:
          out= str(n)+','+out
          X_dumy = int(X_dumy//n)-1
        else:
          out = str(X_dumy%n)+','+out
          X_dumy = int(X_dumy//n)
    return out
ans=Base_10_to_n(N,26)
l=list(ans.split(","))
for i in range(len(l)-1):
  print(chr(int(l[i])+96),end="")

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):
num = int(input())

def rec_get_k(n, current_under, current_k):
  next_k = current_k + 1
  curremt_upper = current_under + 26 ** next_k
  if n < curremt_upper and n >= current_under:
    return next_k
  else:
    return rec_get_k(n, curremt_upper, next_k)

use_k = rec_get_k(num, 1, 0)
use_num = num
res_list = []
tmp_k = use_k
for i in range(use_k):
  tmp_num = use_num % 26
  if tmp_num == 0:
    tmp_num = 26
  use_num -= tmp_num
  use_num = use_num // 26
  res_list.append(chr(96 + (tmp_num)))

res_list.reverse()
print("".join(res_list))

Solution (Python):

def C():
    import math
    n= int(input())

    counter = 0
    for i in range(1,13):
        if int(26*(pow(26,i-1))/(26-1)) <= n < int(26*(pow(26,i))/(26-1)):
            counter = i
            break
    kekka = n - int(26*(pow(26,counter-1))/(26-1))

    alplist=["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"]

    kekkalist = []
    i = counter-1
    while i>= 0 :
        sho = int(kekka / pow(26,i))
        kekka = kekka - pow(26,i)*sho

        i -=1
        if i >= 0:
            kekkalist.append(alplist[sho])
        else:
            kekkalist.append(alplist[sho])


    print("".join(kekkalist))


C()

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

Solution (Python):
alphabetlist=['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']

def ind(b,n):
    check=0
    if n==0:
        return 0
    res=1
    while n>=check:
        check+=26*(res)
        res+=1
    return res-1

N=int(input())
if 26>=N:
    print(alphabetlist[N-1])
    exit()
ans=[]
L=-1
check=0
for i in range(0,50):
    test=check+26**i
    if test>N:
        L=i
        break
    else:
        check=test
ans=[""]*L
n=N-check
for i in range(L-1,-1,-1):
    q=n//(26**i)
    ans[-i-1]=alphabetlist[q]
    n=n-q*26**i
print("".join(ans))

Solution (Python):
def main():
    n = int(input())
    alphabets = [None] + [chr(ord("a") + x) for x in range(26)]
    
    
    
    
    
    

    
    cnt = 0
    m = n
    while m > 0:
        cnt += 1
        m -= 26 ** cnt
    

    
    num = []
    for i in range(cnt):
        
        y = n % (26 ** (i+1))
        
        if y == 0:
          num += [26]
          n -= 26 ** (i+1)
        else:
          n -= y
          num += [y // (26**i)]

    

    ans = ""
    for s in num[::-1]:
        ans += alphabets[s]
    print(ans)


if __name__ == "__main__":
    main()

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):
name="zabcdefghijklmnopqrstuvwxy"
def namer(number):
    if number<=26 :
        return name[number%26]
    if name[number%26]=='z':
        return namer((number//26)-1)+name[number%26]
    return namer(number//26)+name[number%26]
    
number=int(input())
print(namer(number))

Solution (Python):
n = int(input())-1
Lowecases = list(__import__('string').ascii_lowercase)

Base = len(Lowecases)
Name = ''
while True:
    Name = Lowecases[n % Base] + Name
    n //= Base
    if n <= 0:
        break
    n -= 1

print(Name)

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

from scipy.special import comb


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):
import math
from typing import List, NoReturn, Tuple


def main() -> NoReturn:
    n: int = int(input())
    
    group: int = math.ceil(math.log(0.9615384615384616 * n + 1, 26))
    in_group_index: int = n - 1 - (26 * (26 ** (group - 1) - 1)) // 25

    alphabet_num: List[int] = []
    alphabet: str = "abcdefghijklmnopqrstuvwxyz"
    temp = in_group_index
    for i in range(group - 1, -1, -1):
        alphabet_num.append(temp // 26 ** i)
        temp %= 26 ** i
    name_chars: List[str] = [alphabet[i] for i in alphabet_num]
    print("".join(name_chars))


if __name__ == '__main__':
    main()

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

D = 26
lst = []
while N > 0:
    
    
    
    
    

    lst.append(N%D)
    N //= D


ans = ""
z = False
for i in range(len(lst)):
    
    if i == len(lst)-1 and lst[i] == 0:
        break

    if lst[i] == 0:
        ans += 'z'
        while lst[i+1] == 0:
            lst[i+1] = 25
            i+=1
        lst[i+1] -= 1
    else:
        ans += chr(ord('a') - 1 + lst[i])














print("".join(list(reversed(ans))))

Solution (Python):

def main():
    N = int(input())
    ans = ''
    keta = 1
    tmp = 0
    while N > 0:
        cnt = N % 26
        if cnt == 0:
            cnt = 26
            N -= 1
        ans = chr(96+cnt) + ans
        N //= 26
    print(ans)

if __name__ == "__main__":
    main()

Solution (Python):
n = int(input())
kugiri = [0,26,702,18278,475254,12356630,321272406,8353082582,217180147158,5646683826134,146813779479510,3817158266467286]
ans = ""

for i in range(len(kugiri)):
    if n <= kugiri[i]:
        keta = i
        break
        
n -= kugiri[i-1]

for i in range(keta):
    moji = -(-n // 26**(keta-1))
    ans += chr(moji+96)
    n -= (moji-1) * 26**(keta-1)
    keta -= 1
    
print(ans)

Solution (Python):
n = int(input())
s = ""
t = 26
c = ['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']
while n > 0:
    s += c[int(n%t)]
    n -= 1
    n //= 26
print(s[::-1])

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



N = int(input())
answer = ""


while True:
    N = N - 1
    a = int(N / 26)
    b = N % 26
    answer += alphabet[b]
    if a == 0: break
    N = a


print(answer[::-1])

Solution (Python):
import sys 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
N = int(readline())
A = []
while(N>26):
    s = N % 26
    if s == 0:
      A.append(26)
      N = (N-26) // 26
    else:
      A.append(s)
      N = (N-s) // 26
A.append(N)
A = A[::-1]
ans = ''
d = ['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 A:
  ans += d[i-1]
print(ans)

Solution (Python):
N = int(input())
com = [0]
a = 0
v = 0
j = 0
str1 = "abcdefghijklmnopqrstuvwxyz"

if N < 27:
    print(str1[N-1])
else:
    for i in range(1,13):
        a += 26**i
        com.append(a)
    for i in range(13):
        if N < com[i]+1:
            v = com[i-1]
            j = i
            break
    N = N - v - 1
    ans = []
    for i in range(j-1,-1,-1):
        ans.append(str1[N//(26**i)])
        if N >= 26**i:
            N = N - N//(26**i) * (26**i)

    print("".join(ans))

Solution (Python):
s=int(input())-1
d=[]
while s>=0:
  d.append(chr(s%26+97))
  s//=26
  s-=1
t=''
for i in reversed(d):
  t+=i
print(t)

Solution (Python):


if __name__ == "__main__":
    n = input()
    char_string = "qazwsxedcrfvtgbyhnujmikolp"
    char_list = sorted(list(char_string))

    n = int(n)
    result_string = ""
    while 1:
        if n <= 26:
            break
        result_string = char_list[int((n%26)-1)] + result_string
        if (n % 26) == 0:
            n = n//26-1
        else:
            n = n//26
    result_string = char_list[n-1] + result_string
    print(result_string)

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


    ans = []


    while True:
        a,b = divmod(N, 26)
        if a>0 and b == 0:
            a = a-1
            b = 26
        ans.append(b)
        N = a
        if a==0:
            break
    
    trueans = []
    for i in ans:
        trueans.append(chr(96+i))

    print("".join(reversed(trueans)))




if __name__ == "__main__":
    solve()

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

alp = ['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(10**15):
  a = N
  N -= 26**i
  if N < 0:
    n = i
    break
ans = ['']*n
S = [0]*n
for i in range(n):
  S[-i-1] = (a//(26**i))%26
  ans[-i-1] = alp[S[-i-1]]

print(''.join(ans))

Solution (Python):

import sys
import re
from collections import deque, defaultdict
from itertools import combinations, combinations_with_replacement
import bisect
from math import factorial, sqrt, log, ceil, floor
sys.setrecursionlimit(1000000)


def main():
    
    
    

    N = int(input())

    ds = []
    for n in range(12):
        k = 11 - n
        threshold = sum([26 ** i for i in range(k+1)])
        d = 0
        if N >= threshold:
            for j in range(26):
                if N >= threshold + 26 ** k * j:
                    d = j
            d += 1
            N -= 26 ** k * d
        ds.append(d)

    chars = 'abcdefghijklmnopqrstuvwxyz'
    result = ''
    for n in range(12):
        if ds[n] > 0:
            result += chars[ds[n]-1]

    print(result)


if __name__ == '__main__':
    main()

Solution (Python):
def resolve():
    n = int(input())
    name = []
    while n > 0:
        c = n % 26
        n //= 26
        if c == 0:
            name.append('z')
            n -= 1
        else:
            name.append(chr(c + 96))

    name.reverse()
    ans = ''.join(name)
    print(ans)

resolve()

Solution (Python):
n = int(input())
n -= 1
if (n == 0):
	print('a')
else:
	ans = []
	ln = 1
	s = 0
	v = []
	while (s <= n):
		v.append(s)
		s += 26 ** ln
		ln += 1
	v.append(s)
	ln -= 1
	n -= (s - 26 ** (ln + 1))
	
	while (ln > 0):
		ans.append(n % 26)
		n //= 26
		
		
		
		ln -= 1
	ans = ans[::-1]
	
	
	for x in ans:
		print(chr(x + ord('a')), end = "")

Solution (Python):

import sys
input = sys.stdin.readline



def swaparr(arr, a,b):
    temp = arr[a];
    arr[a] = arr[b];
    arr[b] = temp


def gcd(a,b):
    if a == 0:
        return b
    return gcd(b%a, a)


def nCr(n, k): 
    if(k > n - k): 
        k = n - k 
    res = 1
    for i in range(k): 
        res = res * (n - i) 
        res = res / (i + 1) 
    return int(res) 


def upper_bound(a, x, lo=0):
    hi = len(a)
    while lo < hi:
        mid = (lo+hi)//2
        if a[mid] < x:
            lo = mid+1
        else:
            hi = mid
    return lo


def primefs(n):
    
    primes = {}
    while(n%2 == 0 and n > 0):
        primes[2] = primes.get(2, 0) + 1
        n = n//2
    for i in range(3, int(n**0.5)+2, 2):
        while(n%i == 0 and n > 0):
            primes[i] = primes.get(i, 0) + 1
            n = n//i
    if n > 2:
        primes[n] = primes.get(n, 0) + 1
    
    
    return primes


def power(x, y, p): 
    res = 1
    x = x % p  
    if (x == 0) : 
        return 0
    while (y > 0) : 
        if ((y & 1) == 1) : 
            res = (res * x) % p 
        y = y >> 1      
        x = (x * x) % p 
    return res 


def swap(a,b):
    temp = a
    a = b
    b = temp
    return a,b









def find(x, link):
    p = x;
    while( p != link[p]):
        p = link[p];
    
    while( x != p):
        nex = link[x];
        link[x] = p;
        x = nex;
    return p;




def union(x, y, link, size):
    x = find(x, link)
    y = find(y, link)
    if size[x] < size[y]:
        x,y = swap(x,y)
    if x != y:
        size[x] += size[y]
        link[y] = x


def sieve(n): 
    prime = [True for i in range(n+1)] 
    p = 2
    while (p * p <= n): 
        if (prime[p] == True): 
            for i in range(p * p, n+1, p):
                prime[i] = False
        p += 1
    return prime


MAXN = int(1e6 + 5)
def spf_sieve():
    spf[1] = 1;
    for i in range(2, MAXN):
        spf[i] = i;
    for i in range(4, MAXN, 2):
        spf[i] = 2;
    for i in range(3, ceil(MAXN ** 0.5), 2):
        if spf[i] == i:
            for j in range(i*i, MAXN, i):
                if spf[j] == j:
                    spf[j] = i;
    




def factoriazation(x):
    ret = {};
    while x != 1:
        ret[spf[x]] = ret.get(spf[x], 0) + 1;
        x = x//spf[x]
    return ret
    
    


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

def str_array():
    return input().strip().split();


MOD = int(1e9)+7;
CMOD = 998244353;
INF = float('inf'); NINF = -float('inf');



n = int(input());
ans = '';
while(n > 0):
    n -= 1;
    remainder = n % 26;
    digit = chr(remainder + 97);
    ans = digit + ans;
    n = (n - remainder) // 26;
print(ans);