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):
from sys import stdin
n = int(stdin.readline().rstrip())

a = []
while n // 26 >= 1:
    if n%26 == 0:
        a.insert(0, 26)
        n = (n - 26) // 26
    else:
        a.insert(0, n%26)
        n = (n - n%26) // 26
if n > 0:
    a.insert(0, n)

i = 1
while i <= len(a):
    t = a[i-1]
    if t == 1:
        a[i-1] = "a"
    elif t == 2:
        a[i-1] = "b"
    elif t == 3:
        a[i-1] = "c"
    elif t == 4:
        a[i-1] = "d"
    elif t == 5:
        a[i-1] = "e"
    elif t == 6:
        a[i-1] = "f"
    elif t == 7:
        a[i-1] = "g"
    elif t == 8:
        a[i-1] = "h"
    elif t == 9:
        a[i-1] = "i"
    elif t == 10:
        a[i-1] = "j"
    elif t == 11:
        a[i-1] = "k"
    elif t == 12:
        a[i-1] = "l"
    elif t == 13:
        a[i-1] = "m"
    elif t == 14:
        a[i-1] = "n"
    elif t == 15:
        a[i-1] = "o"
    elif t == 16:
        a[i-1] = "p"
    elif t == 17:
        a[i-1] = "q"
    elif t == 18:
        a[i-1] = "r"
    elif t == 19:
        a[i-1] = "s"
    elif t == 20:
        a[i-1] = "t"
    elif t == 21:
        a[i-1] = "u"
    elif t == 22:
        a[i-1] = "v"
    elif t == 23:
        a[i-1] = "w"
    elif t == 24:
        a[i-1] = "x"
    elif t == 25:
        a[i-1] = "y"
    elif t == 26:
        a[i-1] = "z"
    i += 1

print(''.join(a))

Solution (Python):
import sys
input = sys.stdin.readline
def conv(n):
    n+=97
    return chr(n)

n= int(input())
ans = ''
while n>0:
    n-=1
    ans+=conv(n%26)
    n//=26
print(ans[::-1])

Solution (Python):

def conv(a): 
  a += 97
  return chr(a)


n = int(input())
name = ''

while n>0:
  n -= 1
  name += conv(n%26)
  n //= 26


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=num2alpha(int(input()))
n=str(n.lower())
print(n)

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 7)

f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    n = int(input())
    L = [chr(i) for i in range(97, 97 + 26)]

    res = ""
    while n:
        r = n % 26
        res += L[r - 1]
        n = max(0, (n - 1)) // 26
    print(res[::-1])


if __name__ == '__main__':
    resolve()

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())
ans = ""
while n > 0:
    re = n % 26
    if re != 0:
        ans = chr(ord('a') + (re - 1)) + ans
        n = n // 26
    else:
        ans = 'z' + ans;
        n = n // 26 - 1
print(ans)

Solution (Python):
n=int(input())
ans = " "
while n>0:
    re=n%26
    if re!=0:
        ans= chr(ord('a')+re-1)+ans
        n=n//26
    else:
        ans='z'+ans
        n=(n//26)-1
print(ans)

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

ans = ""
while N > 0:
    N -= 1
    ans += chr(N%26+97)
    N //= 26
print(ans[-1::-1])

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

ans=""
d="abcdefghijklmnopqrstuvwxyz"
while n!=0:
    n-=1
    ans+=d[n%26]
    n//=26

print(ans[::-1])

Solution (Python):
N = int(input())
n = N
alpha = "abcdefghijklmnopqrstuvwxyz"

for i in range(1,12):
    
    if n <= 26 ** i:
        digits = i
        break
    else:
        n -= 26 ** i

n -= 1
output = ""
for j in range(digits-1):
    amari = n % 26
    n //= 26
    output = alpha[amari] + output
output = alpha[n] + output
print(output)

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

ans = ""
while N > 0:
  N -= 1
  ans += chr(ord("a") + N % 26)
  N //= 26

print(ans[:: - 1])

Solution (Python):
import sys
import numpy as np
import math
import collections
from collections import deque 
from functools import reduce


n = int(input())
ret = ''
while(n > 0):
    n -= 1
    ret += chr(ord('a') + n % 26)
    n //= 26
print(ret[::-1])

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

ans=""
d="abcdefghijklmnopqrstuvwxyz"
while n!=0:
    n-=1
    ans+=d[n%26]
    n//=26

print(ans[::-1])

Solution (Python):
n=int(input())
l="abcdefghijklmnopqrstuvwxyz"
for r in range(0,11):
    start=0
    for x in range(r+1):
        start+=26**x
    end=start+26**(r+1)-1

    if start<=n<=end:
        o=[]
        for x in range(r+1)[::-1]:
            o.append(l[((n-start)//(26**x))%26])
        print("".join(map(str,o)))
        exit()

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

i = 1
ans = ""
while n != 0:
    p = n%26 if n%26 != 0 else 26
    ans  = chr(p + 96) + ans

    n = n-p
    n = n//26
    i += 1

print(ans)

Solution (Python):
n = int(input())
ans = ''
while n > 0:
    n -= 1
    ans += chr(97 + n%26)
    n //= 26
print(ans[::-1])

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

alpha = [chr(x) for x in range(97, 123)]

def N_to_al(N, res):
  x = N // 26
  r = N % 26
  res += alpha[r-1]
  
  if r == 0:
    x = x - 1
  if x > 0:
    return N_to_al(x, res)
  else:
    return res

res = N_to_al(N, "")
res = res[::-1]
print(res)

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

nn=n
i=1
while nn > 26**i:
    nn-=26**i
    i+=1

an=['a']*i
j=0
while n:
    n-=1
    wk=n%26
    an[j]=(chr(ord('a')+wk))
    n = n//26
    j+=1
    
an.reverse()
print(''.join(an))

Solution (Python):
def numtoalph(x):
  if x<=26:
    return chr(96+x)
  elif x%26==0:
    return numtoalph(x//26-1)+'z'
  else:
    return numtoalph(x//26)+chr(96+x%26)

print(numtoalph(int(input())))

Solution (Python):
mod = 1000000007
eps = 10**-9


def main():
    import sys
    from bisect import bisect_left
    input = sys.stdin.readline

    N = int(input())

    A = [1]
    a = 1
    for i in range(1, 10000):
        a += 26**i
        A.append(a)
        if a > 1000000000000001:
            break

    i = bisect_left(A, N+1)
    N0 = A[i]
    K = N - N0
    ans = [97] * i
    for j in range(i):
        ans[-j-1] += K % 26
        K //= 26
    print("".join(map(chr, ans)))


if __name__ == '__main__':
    main()

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

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

ans = ''

def conn(n):
  global ans
  h,r = divmod(n, 26)
  if r == 0:
    r = 26
    h -= 1
  ans = al[r] + ans
  
  if h > 0:
    conn(h)

conn(N)
print(ans)

Solution (Python):
def solve(N):
    ans = ""
    while N > 0:
        q,r = N // 26,N % 26
        if r == 0:
            q -= 1
            r = 26
        ans = chr(96 + r) + ans
        N = (N - r) // 26

    return ans

def main():
    N = int(input())

    print(solve(N))

if __name__ == "__main__":
    main()

Solution (Python):



def main():
    from string import ascii_lowercase
    import sys
    input = sys.stdin.readline

    n = int(input())
    ans = ''
    alpha = list(ascii_lowercase)

    while n >= 26:
        p, q = divmod(n, 26)

        ans += alpha[q - 1]
        n = p

        if q == 0:
            n -= 1

    if 0 < n < 26:
        ans += alpha[n - 1]

    print(ans[::-1])


if __name__ == '__main__':
    main()

Solution (Python):
def main():
    N = int(input()) - 1
    digit = 1
    while N >= 26 ** digit:
        N -= 26 ** digit
        digit += 1
    buf = []
    a = ord("a")
    for i in range(digit):
        buf.append(chr(a + (N % 26)))
        N //= 26
    ans = "".join(buf[::-1])
    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):

import sys
input = sys.stdin.readline
 
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

num = I()
result = ""
alphabet = [chr(ord('a') + i) for i in range(26)]

while True:
    num -= 1
    result = alphabet[num % 26] + result
    num //= 26
    if num == 0:
        break
print(result)

Solution (Python):
N=int(input())
N-=1
for i in range(1,15):
  if N>=26**i:
    N-=26**i
    continue
    
  ans=''
  for j in range(i):
    d=N%26
    ans+=chr(d +ord('a'))
    N//=26
  ans=ans[::-1]
  break
print(ans)

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

Solution (Python):
import string
s = string.ascii_lowercase


def f(x, tmp):
    if x == 0:
        return ""
    x -= 1
    if x < 26:
        return s[x] + tmp
    else:
        return f(x // 26 , s[x % 26] + tmp)


n = int(input())
r = f(n, "")
print(r)

Solution (Python):


st="Xabcdefghijklmnopqrstuvwxyz"
ans=""
kazu=int(input())
while(True):
    add=kazu%26
    if(add==0):
        add=26
    ans=st[add]+ans
    kazu-=add
    if(kazu==0):
        break
    kazu=kazu//26

print(ans)

Solution (Python):
n = int(input())
chars = "Xabcdefghijklmnopqrstuvwxyz"  

n_rem = n  
res = ""

while True:
    x = n_rem % 26
    
    if x == 0:
        x = 26
    res += chars[x]

    
    n_rem -= x

    
    if n_rem == 0:
        break

    n_rem //= 26


print(res[::-1])

Solution (Python):
import sys


def input():
    return sys.stdin.readline().strip()


sys.setrecursionlimit(20000000)

MOD = 10 ** 9 + 7
INF = float("inf")


def main():
    N = int(input())
    answer = ""

    for i in range(1, 99):
        if N <= 26 ** i:
            N -= 1
            for j in range(i):
                answer += chr(ord("a") + N % 26)
                N //= 26
            break
        else:
            N -= 26 ** i

    print(answer[::-1])


if __name__ == "__main__":
    main()

Solution (Python):
n = int(input())
ans = ""
while n>0:
    n -= 1
    ans += chr(ord("a")+n%26)
    n = n//26

print(ans[::-1])

Solution (Python):
n = int(input())
s = ""
while n > 0:
  n -= 1
  s += chr(97 + (n % 26))
  n //= 26
print(s[::-1])

Solution (Python):
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections
import copy

def main():
    n = int(input())
    ans = ""
    alpa = "abcdefghijklmnopqrstuvwxyz"
    while n:
        ans += alpa[n%26-1]
        n-=1
        n//=26
    ans2 = ""
    for i in range(len(ans)):
        ans2 += ans[len(ans)-i-1]
    print(ans2)
if __name__ == "__main__":
    main()

Solution (Python):
N = int(input())
ans = ''
while N > 0:
  N -= 1
  ans += chr(ord('a') + N % 26)
  N //= 26
print(ans[::-1])

Solution (Python):
n = int(input())
r = []
while (True):
    n = n - 1
    r.append(chr(n % 26 + ord("a")))
    n = n // 26
    if n == 0:
        break
print("".join(reversed(r)))

Solution (Python):


n = int(input())
res =''
while n > 0:
    n -= 1
    res += chr(ord('a') + n % 26)
    n //= 26
print(res[::-1])

Solution (Python):


n=[int(i) for i in input().split()]

now=n[0]
li=[]
while now>26:
    if now%26!=0:
        li.append(now%26)
        now=now//26
    else:
        li.append(26)
        now=now//26-1
    
li.append(now)


ans=""
for i in li:
    ans+=chr(96+i)

print(ans[::-1])

Solution (Python):
n = int(input())
ans = ''
while n > 0:
    n -= 1
    ans += chr(97 + n % 26)
    n //= 26
print(ans[::-1])

Solution (Python):
n = int(input())
res = ''
while n > 0:
    n, t = divmod(n, 26)
    if t == 0:
        t = 26
        n -= 1
    res += chr(96+t)

print(res[::-1])

Solution (Python):



n = int(input())
res = str()
while 0 < n:
    n -= 1
    r = n % 26
    res += chr(r+ord('a'))
    
    n //= 26
 
print(res[::-1])

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

alphabets = [chr(i) for i in range(97, 97+26)]
x = N
ans = ""

while True:
    x -= 1
    ans = alphabets[x % 26] + ans
    x //= 26
    if x <= 0:
        break

print(ans)

Solution (Python):
def solve(n):
    s = [chr(ord("a")+i) for i in range(26)]
    res = ""
    while n > 0:
        n -= 1
        res = s[n % 26] + res
        n //=26
    return res

n = int(input())
print(solve(n))

Solution (Python):
n = int(input())
res = ''
while n > 0:
    n, t = divmod(n, 26)
    if t == 0:
        t = 26
        n -= 1
    res += chr(96+t)
print(res[::-1])

Solution (Python):
n=int(input())
s=""
i=0
while n>0:
  if n%26==0:
    s+="z"
    n-=26
  else:
    s+=chr(ord("a")-1+n%26)
    n-=n%26
  i+=1
  n//=26
print(s[::-1])

Solution (Python):
N=int(input())
num=0
ans=""
for i in range(1,99):
    if 26**i >= N:
        N-=1
        for j in range(i):
            ans+=chr(97+N%26)
            N//=26
        break
    else:
        N-=26**i
print(ans[::-1])

Solution (Python):
n = int(input())
res = ''
while 0 < n:
    n -= 1
    r = n % 26
    res += chr(r+ord('a'))
    
    n //= 26

print(res[::-1])

Solution (Python):
n=int(input())
ans=""
while n>0:
    n-=1
    ans+=chr(97+n%26)
    n=n//26
print(ans[::-1])

Solution (Python):
N=int(input())
ans=''
for i in range(1,99):
    if N<=26**i:
        N-=1
        for j in range(i):
            ans+=chr(ord('a') + N%26)
            N//=26
        break
    else:
        N-=26**i
print(ans[::-1])

Solution (Python):
n = int(input())
kouho = [chr(i) for i in range(97, 97+26)]
ans = []
while n>0:
    n-=1
    ans.append(kouho[n%26])
    n = n//26
ans.reverse()
print(''.join(ans))

Solution (Python):
alphabet = 'abcdefghijklmnopqrstuvwxyz'
def convert(num):
    i, n = 1, 26
    while n < num:
        num -= n
        n *= 26
        i += 1
    num -= 1
    
    res = ''
    while num >= 26:
        res = alphabet[num % 26] + res
        num //= 26
    return '{:{fill}{align}{width}}'.format(alphabet[num % 26] + res, fill='a', align='>', width=i)

print(convert(int(input())))

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

alphabet = 'abcdefghijklmnopqrstuvwxyz'


def name(n):
    if n <= 26:
        return alphabet[n - 1]
    else:
        return name((n - 1) // 26) + name(n % 26)


print(name(n))

Solution (Python):
def solve():
    n=int(input())
    ans=''
    check='abcdefghijklmnopqrstuvwxyz'
    while n!=0:
        n-=1
        ans+=check[n%26]
        n //= 26
    print(ans[::-1])
    return 0

if __name__ == "__main__":
    solve()

Solution (Python):
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

n = ni()-1

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

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

Solution (Python):
N = int(input())
x = 1
alphabet = {i-96:chr(i) for i in range(97, 97+26)}
if int(N) > 26:
    ans = ''
    while x != 0:
        x = N // 26
        mod = N%26
        
        if mod == 0:
            ans += 'z'
            
            x -= 1
        else:
        
            ans += alphabet[mod]
        N = x
else:
    ans = alphabet[int(N)]
print(ans[::-1])

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




res=''


total=0
i=1
while True:
    if total+26**i>=n:
        break
    else:
        total+=26**i
        i+=1


k=n-total-1
for j in range(i):
    res+=chr(ord('a')+k%26)
    k=k//26

print(res[::-1])

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

txt = ''
while N > 0:
    N -= 1

    ama = N % 26
    digit = chr(ord('a') + ama)
    txt += digit
    N = N//26

print(txt[::-1])

Solution (Python):
import sys, re
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left
from functools import reduce
from decimal import Decimal, getcontext

def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_list(N): return [s_list() for _ in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 10 ** 9 + 7
num_list = []
str_list = []

def main():
    n = i_input()

    ans = ''
    al=[chr(ord('a') + i) for i in range(26)]

    while n > 0:
        n -= 1
        ans += al[n%26]
        n //= 26

    print(ans[::-1])
 
if __name__ == '__main__':
    main()

Solution (Python):
al = [chr(97+i) for i in range(26)]
n = int(input())
res = ""
while n > 0:
    n -= 1
    res += al[n%26]
    n = int(n/26)
print(res[::-1])

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

Solution (Python):
n = int(input())
s = ""
while n > 0:
  n -= 1
  s = chr(ord("a") + n % 26) + s
  n //= 26
print(s)

Solution (Python):
n = int(input())
ans=""
while(n):
    n-=1
    ans += chr(ord('a')+(n%26))
    n = n//26

print(ans[::-1])

Solution (Python):
import sys

if sys.subversion[0] == "PyPy":
    import io, atexit

    sys.stdout = io.BytesIO()
    atexit.register(lambda: sys.__stdout__.write(sys.stdout.getvalue()))

    sys.stdin = io.BytesIO(sys.stdin.read())
    input = lambda: sys.stdin.readline().rstrip()
RS = raw_input
RA = lambda x=int: map(x, RS().split())
RN = lambda x=int: x(RS())


def solve():
    s = numberToBase(n, 26)
    for i in reversed(range(len(s))):
        if s[i] <= 0:
            if i-1 >= 0:
                s[i] += 26
                s[i-1] -= 1
            else:
                s.remove(0)
    
    ans = [chr(int(c) + ord("a")- 1) for c in s]
    print "".join(ans)
    return


def numberToBase(n, b):
    if n == 0:
        return [0]
    digits = []
    while n:
        digits.append(int(n % b))
        n //= b
    return digits[::-1]

n = RN()
solve()

Solution (Python):
n = int(input())
r = ''
e = 26
while n > 0:
    n -= 1
    r = chr(97 + n % e) + r
    n //= e
print(r)

Solution (Python):
def main():
	N = int(input())
	a = ord('a')
	ans = ''
	while N!=0:
		N -= 1
		ans = chr(a + N % 26) + ans
		N //= 26
	print(ans)

main()

Solution (Python):
def main():
	N = int(input())
	a = ord('a')
	ans = ''
	while N!=0:
		N -= 1
		ans = chr(a + N % 26) + ans
		N //= 26
	print(ans)

main()

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

while n > 0:
    n -= 1
    ans += chr(ord('a') + n % 26)
    n //= 26
print(ans[::-1])

Solution (Python):
n = int(input())
alp = 'abcdefghijklmnopqrstuvwxyz'
ans = []
while n > 0:
  n -= 1
  x = n%26
  ans.append(x)
  n //= 26
ans.reverse()

a = ''
for i in ans:
  b = alp[i]
  a += b
print (a)

Solution (Python):
n=int(input())
out=""
while(1):
    n-=1
    asc=n%26
    asc=97+asc
    out+=chr(asc)
    n=(n//26)
    if(n<=0):
        break

print(out[::-1])

Solution (Python):
N = int(input())
en_list = "abcdefghijklmnopqrstuvwxyz"
answer = ""
while N > 0:
    r = N % 26
    if r == 0:
        r = 26
    answer = en_list[r-1] + answer
    N = (N - r) // 26
print(answer)

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

Solution (Python):

import sys
import numpy as np
input = sys.stdin.readline
n=int(input())
Z = [chr(i) for i in range(97, 97+26)]
ans = ""
def div(k):
    k ,mod = divmod(k, 26)

    global ans
    ans += Z[mod-1]
    if mod == 0:
        return k-1
    else:
        return k


for i in range(20):
    n = div(n)
    if n == 0 and len(ans)==1:
        print(ans)
        sys.exit()

    elif n ==0 :
        print(ans[::-1])
        sys.exit()

sys.exit()

Solution (Python):
import sys
input = sys.stdin.readline

n = int(input())
ans = ''

for i in range(1, 99):
    if n <= 26**i:
        n -= 1
        for j in range(i):
            ans += chr(ord('a') + n%26)
            n //= 26
        break
    else:
        n -= 26**i

print(ans[::-1])

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(str.lower(num2alpha(n)))

Solution (Python):
alphabet='abcdefghijklmnopqrstuvwxyz'
N=int(input())
name=''
while N>0:
  N-=1
  name+=alphabet[N%26]
  N//=26
print(name[::-1])

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

while True:
  temp = N % 26
  N = int(N/26)
  ans = alpha[temp] + ans
  
  if N == 0:
    break
  else:
    N -= 1
    
print(ans)

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

ans = ""
def n(N):
    ans= ""
    for i in range(N):
        if N%26 ==0:
            ans = "z" +ans
            N -= 1
        else:
            ans = chr(64+ N%26) +ans
        
        if N <= 26:
            break
        N = N // 26
    return ans
    

print(n(N).lower())

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

Solution (Python):
n = int(input())
ans = ''
cnt = 0
while n!=0:
  r = n%26
  if r==0:
    ans += 'z'
    r = 26
  else:
    ans += chr(96+r)
  n -= r
  n //= 26
print(ans[::-1])

Solution (Python):
import sys



def solve(n):
    
    NCHARS = int(26)
    MAXVAL = NCHARS
    ndigs = 1
    while n > MAXVAL:
        ndigs += 1
        n -= MAXVAL
        MAXVAL *=  NCHARS
    
    
    n -= 1
    result = ''
    while n > 0:
        
        
        result += chr(n%NCHARS + ord('a'))
        n //= NCHARS
        
        
        
    if len(result) < ndigs:
        result += ''.join(['a' for i in range(ndigs-len(result))])
    print(''.join([c for c in result][::-1]))
        

        


if __name__ == '__main__':
    IN = [x.strip() for x in sys.stdin.readlines()]

    n = int(IN[0])
    solve(n)

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):
def int2chr(n: int):
    if n == 0:
        return 'z'
    else:
        return chr(n + 96)


n = int(input())

name = ""
pow_index = 1
while True:
    m = n % 26
    name = int2chr(m) + name
    n -= m
    n //= 26
    if m == 0:
        n -= 1
    if n == 0:
        break
print(name)

Solution (Python):
n = int(input())
rev = []
nn = n
def c(n):
    k = 1
    i = 1
    while n > 26 ** i:
        n -= 26 ** i
        k += 1
        i += 1
    return n

def d(n):
    k = 1
    i = 1
    while n > 26 ** i:
        n -= 26 ** i
        k += 1
        i += 1
    return k

n = c(n) - 1
while n > 25:
    r = n % 26
    rev.append(r)
    n //= 26
rev.append(n)
sl = list('abcdefghijklmnopqrstuvwxyz')
l = len(rev)
name = []
for i in range(d(nn) - l):
    name.append('a')
for i in range(len(rev)):
    d = sl[rev[l - 1 - i]]
    name.append(d)
dogname = ''.join(name)
print(dogname)

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):
n = int(input())
ans = ''
check = 'abcdefghijklmnopqrstuvwxyz'

while n!=0:
  n-=1
  ans+=check[n%26]
  n//=26

print(ans[::-1])

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());
digits = []; b = 26;
while(n):
    n -= 1;
    digits.append(n % b);
    n //= b;
ans = '';
for i in digits:
    ans = chr(97 + i) + ans;
print(ans);

Solution (Python):
n = int(input())
name = []
while n > 0:
    n, m = divmod(n, 26)
    if m == 0:
        n -= 1
        m = 26
    name.insert(0, chr(m + 96))
print("".join(name))

Solution (Python):
a=int(input())
name=""
while a>0:
    a-=1
    name+=chr(97+a%26)
    a//=26
print(name[::-1])

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

name = ""

while n>0:
    n -= 1
    name += chr(ord('a') + n%26)
    n //= 26
print(name[::-1])

Solution (Python):
N = int(input())
alph = {key + 1: val for key, val in enumerate('abcdefghijklmnopqrstuvwxyz')}
alph[0] = 'z'
answer = ''
while N >= 1:
  answer = alph[N % 26] + answer
  if N == 26:
    break
  N = (N - 1) // 26

print(answer)

Solution (Python):
import numpy as np

N = int(input()) 
ans = ""

while(N > 0):
    tmp = N % 26
    if tmp == 0:
        ans += "z"
        N = N // 26 - 1
        continue
    ans += chr(96 + tmp)
    N = N // 26

print(ans[::-1])

Solution (Python):
n = int(input())
ans = ''
check = 'abcdefghijklmnopqrstuvwxyz'

while n != 0:
    n -= 1
    ans += check[n%26]
    n = n//26

print(ans[::-1])

Solution (Python):
n = int(input());
ans = '';
ptr = 0;
while(n>0):
  n-=1;
  temp = n%26;
  n=n//26;
  ans = chr(97+temp)+ ans 
print(ans)

Solution (Python):
A_UPPERCASE=97
ALPHABET_SIZE=26
def _decompose(number):
    """Generate digits from `number` in base alphabet, least significants
    bits first.

    Since A is 1 rather than 0 in base alphabet, we are dealing with
    `number - 1` at each iteration to be able to extract the proper digits.
    """

    while number:
        number, remainder = divmod(number - 1, ALPHABET_SIZE)
        yield remainder


def base_10_to_alphabet(number):
    return ''.join(
            chr(A_UPPERCASE + part)
            for part in _decompose(number)
)[::-1]
print(base_10_to_alphabet(int(input())))

Solution (Python):



def get_input() -> int:
    """
    標準入力を取得する.

    Returns:\n
        int: 標準入力
    """
    N = int(input())

    return N


def main(N: int) -> None:
    """
    求解処理.

    Args:\n
        N (int): 整数
    """
    
    ans = ""
    while N > 0:
        N -= 1
        ans += chr(ord("a") + N % 26)
        N //= 26
    ans = ans[::-1]

    
    print(ans)


if __name__ == "__main__":
    N = get_input()
    main(N)

Solution (Python):



def get_input() -> int:
    """
    標準入力を取得する.

    Returns:\n
        int: 標準入力
    """
    N = int(input())

    return N


def main(N: int) -> None:
    """
    求解処理.

    Args:\n
        N (int): 整数
    """
    
    ans = ""
    while N > 0:
        N -= 1
        ans += chr(ord("a") + N % 26)
        N //= 26
    ans = ans[::-1]

    
    print(ans)


if __name__ == "__main__":
    N = get_input()
    main(N)

Solution (Python):
num = int(input())
s = 'abcdefghijklmnopqrstuvwxyz'
ans = ''

while num > 0:
    num -= 1
    num, rest = divmod(num, 26)
    ans += s[rest]
print(ans[::-1])

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

Solution (Python):

N = int(input())

index = [None] * 11
n = N
for i in range(0, 11, 1):
  a = n % 26
  if a == 0:
    index[i] = 26
    n = (n // 26) - 1
  else:
    index[i] = a
    n = n // 26  
  if n == 0:
    break
  
word = ''
for i in index:
  s = ''
  if i:
    s = chr(ord('a') + i - 1)
    word += s
print(word[::-1])

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

res = ""
while N > 0:
    N -= 1
    r = N % 26
    res = chr(r + 97) + res
    N //= 26
print(res)

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

res = ""
while N > 0:
    r = (N - 1) % 26
    res = chr(r + 97) + res
    N -= r + 1
    N //= 26
print(res)

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

while N > 0:
    N -= 1
    ans += chr(ord('a') + N%26)
    N //= 26

print(ans[::-1])

Solution (Python):
def main():
    n = int(input())
    alphabet = 'abcdefghijklmnopqrstuvwxyz'
    cnt = 0
    while n > 0:
        cnt += 1
        n = n - 26 ** cnt

    ans = ''
    if n == 0:
        print(''.join(['z' for _ in range(cnt)]))
        return

    n -= 1
    for i in range(cnt):
        ans = alphabet[n % 26] + ans
        n //= 26

    print(ans)


if __name__ == '__main__':
    main()