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())-1
L=[]
S=[]
A=[chr(i) for i in range(97,123)]
X=""
while N>=0:
  if N==0:
    L.append(N%26)
    N=N//26
    break
  elif N!=0:
    L.append(N%26)
    N=N//26-1
S=list(reversed(L))
for i in range(len(S)):
  X+=A[S[i]]
print(str(X))

Solution (Python):
def main():
    N = int(input())
    l = "abcdefghijklmnopqrstuvwxyz"
    ans = ""

    while N > 0:
        ans = l[N % 26 - 1] + ans
        N = (N-1) // 26

    print(ans)


if __name__ == "__main__":
    main()

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())
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 = ""
for i in reversed(range(12)):
    b=0
    if n//26**i>0:
        for j in range(i):
            b+=26**j
    a = (n-b)//26**i
    ans += alphabet[a]
    n = n-a*(26**i)
print(ans)

Solution (Python):

import sys
import re
n = int(input())
ABC = [chr(i) for i in range(97,97+26)]
ans = []

a = n
while a > 0:
    a -= 1
    t = a%26
    a = a//26
    ans.append(ABC[t])
ans.reverse()
print(''.join(ans))

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

alphabets = 'zabcdefghijklmnopqrstuvwxyz'
numbers = list(range(0, 26, 1))
alphabet_dict = {}
for i in numbers:
    alphabet_dict[i] = alphabets[i]

words = []
while True:
    if n >= 1:
        cnt = n % 26
        word = alphabet_dict[cnt]
        words.append(word)
        if cnt == 0:
            n = (n//26) - 1
        else:
            n = n//26
    else:
        break

words.reverse()
print(''.join(words))

Solution (Python):
def dogsName(n):
	if (n==0):
		return
	n = n-1
	last_char = n%26
	dogsName(n//26)
	print(chr(ord('a') + last_char), end='')

n = int(input())
dogsName(n)

Solution (Python):
n = int(input())
alpha = 'abcdefghijklmnopqrstuvwxyz'
name = ''
tmp1 = n
while tmp1 > 0:
    tmp1 -= 1
    tmp1, tmp2 = tmp1//26, tmp1%26 
    name += alpha[tmp2]
print(name[::-1])

Solution (Python):
def generate(n):
	if n == 0:
		return ""
	return generate((n-1)//26) + chr((n-1)%26+ord('A'))

n = int(input())
print(generate(n).lower())

Solution (Python):
N = int(input())
Alphabet = str('abcdefghijklmnopqrstuvwxyz')
import bisect

List = [0, 26, 702, 18278, 475254, 12356630, 321272406, 8353082582, 217180147158, 5646683826134, 146813779479510, 3817158266467286, 99246114928149462, 2580398988131886038, 67090373691429037014, 1744349715977154962390, 45353092615406029022166, 1179180408000556754576342, 30658690608014475618984918]
V = []

if List.count(N) == 1:
	for i in range (0, List.index(N)):
		V.append('z')
	print(*V, sep = '')
	exit()

k = 26
A = [0]
for i in range (2, 20):
	A.append(k)
	k = k+26**i
    
S = []

B = bisect.bisect_right(A, N)

N = N-A[B-1]-1
for i in range (0, B):
	S.append(Alphabet[N%26])
	N = N//26
    
S = reversed(S)
print(*S, sep = '')

Solution (Python):



num = int(input())

qm = 1000000000000001

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


ans = []
f = False

for i in range(12):
    c = (num-1) % 26
    ans += alf[c]
    num = (num-1) // 26
    if num < 1:
        break

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

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

def ntoa(n):
    return chr(ord('a') + n)

s = ''
while True:
    c = (N-1) % 26
    s += ntoa(c)
    N = (N-1) // 26
    if N <= 0:
        break

print(''.join(list(reversed(s))))

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

ans = ""

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

print(ans)

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

Solution (Python):
N=int(input())
List='abcdefghijklmnopqrstuvwxy'

Ans=''

while N>=1:
    Amari=N%26
    
    if Amari==0:
        Ans='z'+Ans
    else:
        Ans=List[Amari-1]+Ans
        
    N=(N-1)//26
    
print(Ans)

Solution (Python):
def main():
  N = int(input())
  ans = ''
  abc = "abcdefghijklmnopqrstuvwxyz"
  
  
  while N > 0:
    N -=1
    ans += abc[N % 26]
    
    N = N//26
  
  print(ans[::-1])
  
  
  
main()

Solution (Python):
import math
li=[chr(i) for i in range(97, 97+26)]
AnsFromRight = []
AmsFromLeft=[]
def GetN_Hidari(j):
        tmp=0
        for k in range(j+1):
            tmp+=26**k
        return tmp-1        

N=int(input())
i=0
while True:
    N_HidariCut=N-GetN_Hidari(i)
    if N_HidariCut<=0:
        break
    OrderWithinKatamari = N_HidariCut%(26**(i+1))
    AnsFromRight.append(li[math.ceil(OrderWithinKatamari/(26**i)-1)])
    i+=1    
AnsFromLeft= AnsFromRight[::-1]
print("".join(AnsFromLeft))

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

def change_n_shinsu(x, n):
    ans = []
    while True:
        shou = x // n
        amari = x % n
        if shou == 0 and amari == 0:
            break
        ans.append(amari)
        x = shou
    return ans

end = [26]
for i in range(2, 100):
    end.append(26**i+end[-1])
    if end[-1] > 1000000000000001:
        break
start = [1]
for i in end[:-1]:
    start.append(i+1)

i = 0
while n > end[i]:
    i += 1
keta = i+1
n -= start[i]

ret = change_n_shinsu(n, 26)
ans = ''
for i in ret:
    ans = chr(i+ord('a')) + ans
ans = 'a'*(keta-len(ret)) + ans
print(ans)

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

s = "abcdefghijklmnopqrstuvwxyz"
ans = ""
n, m = 0, 0

for i in range(1, 1000):
    m += 26 ** i
    if N <= m:
        n = i
        break

for i in range(n):
    a, b = divmod(N, 26)
    N = a
    if b == 0:
        ans += s[25]
        N -= 1
    else:
        ans += s[b-1]

ans1 = ''.join(list(reversed(ans)))
print(ans1)

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

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

Solution (Python):
a = ['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']
 
b = int(input())
r = ''
while b > 0:
  b -= 1
  c = b % len(a)
  r = a[c] + r
  b = int(b / len(a))
print(r)

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

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

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

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

ans = ""
li = "abcdefghijklmnopqrstuvwxyz"

while N > 0:
    N -= 1
    ans += li[N % 26]
    N //= 26

print(ans[::-1])

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

Solution (Python):
def main():
    from string import ascii_lowercase
    N = int(input())

    ans = []
    while N > 0:
        N -= 1
        N, i = divmod(N, 26)
        ans.append(ascii_lowercase[i])

    ans = ''.join(reversed(ans))

    print(ans)


if __name__ == '__main__':
    main()

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

abc='abcdefghijklmnopqrstuvwxyz'

ans=''
while n!=0:
  q=n%26
  ans+=abc[q-1]

  if q==0:
    n-=1

  n//=26

print(ans[::-1])

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

Solution (Python):
ma = lambda :map(int,input().split())
ni = lambda:int(input())
import collections
import math
import itertools
gcd = math.gcd
n = ni()
alp = "abcdefghijklmnopqrstuvwxyz"
ans = ""

while True:
    n-=1
    r =  n%26
    ans=  alp[r] +ans
    n //= 26

    if n==0:break
print(ans)

Solution (Python):
n = int(input())
alp = "abcdefghijklmnopqrstuvwxyz"
name = ""
while n > 0:
    name += alp[n%26-1]
    n = (n-1)//26
print(name[::-1])

Solution (Python):
from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import numpy as np
import itertools
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

N = I()

ans = ""
for i in range(1,100):
    n = 26**i
    if N > n:
        N -= 26**i
        continue

    N = N - 1
    for j in range(i):
        x,y = divmod(N, 26)
        ans += chr(ord('a') + y)
        N = N //26
    break
    
print(ans[::-1])

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

    string = ""
    i = 0
    while n > 0: 
        rem = n % 26
        if rem == 0: 
            string += 'z'
            i += 1
            n = (n // 26) - 1
        else: 
            string += str(chr((rem - 1) + ord('a')))
            i += 1
            n = n // 26
    string = string[::-1] 
    print(string)

solve(n)

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

i= 0
name = ''
while n>0:
    n -= 1
    name += chr(ord('a')+n%mod)
    n //= mod


print(name[::-1])

Solution (Python):
n = int(input())
name = []
while n:
	n-=1
	name.append(chr(97 + (n%26)))
	n//=26
name.reverse()
print(''.join(name))

Solution (Python):
import copy
n=int(input())
n_copy1=copy.copy(n)
n_copy2=copy.copy(n)
alfabet=list("abcdefghijklmnopqrstuvwxyz")
ans=[]
i=0
while n_copy1>0:
    i+=1
    n_copy1-=26**i
n_copy2=n_copy2-(26**i-1)//25
for i in range(i):
    ans.append(alfabet[n_copy2%26])
    n_copy2=n_copy2//26
print("".join(ans[::-1]))

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

m = {}
for i in range(0,26):
  m[i] = chr(97+i)

ans = ''
while 1:

  n -= 1

  x = n // 26
  y = n % 26

  ans = m[y] + ans

  n = x
  if n == 0:
    break

print(ans)

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 = ""
while n:
    n -= 1
    ans = chr(97 + n % 26) + ans
    n //= 26

print(ans)

Solution (Python):
def solve():
  N = int(input())
  k = 1
  while N>pow(26,k):
    N -= pow(26,k)
    k += 1
  ans = ''
  N -= 1
  for i in range(k,1,-1):
    ans += chr(ord('a')+N//pow(26,i-1))
    N%=pow(26,i-1)
  ans += chr(ord('a')+N%26)
  return ans
print(solve())

Solution (Python):
def II(): return int(input())
N=II()
N-=1
i=1
ans=''
while N-26**i>=0:
  N-=26**i
  i+=1
for j in range(i):
  div,mod=divmod(N,26)
  ans+=chr(mod+ord('a'))
  N=div
ans=ans[::-1]
print(ans)

Solution (Python):



from fractions import gcd
from itertools import combinations,permutations,accumulate 

from collections import deque,defaultdict,Counter
import decimal
import re











import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
n = I()
ans = ""
while n > 0:
    m = n%26
    nya = m-1 if m-1 >= 0 else 25
    ans += chr(ord('a') + nya)
    n -= nya
    n //= 26
print(ans[::-1])

Solution (Python):
def solve():
  N = int(input())
  k = 1
  while N>pow(26,k):
    N -= pow(26,k)
    k += 1
  ans = ''
  N -= 1
  for i in range(k,0,-1):
    if i>1:
      ans += chr(ord('a')+N//pow(26,i-1))
    else:
      ans += chr(ord('a')+N%pow(26,i))
    N%=pow(26,i-1)
  return ans
print(solve())

Solution (Python):
D = {i:chr(96+i) for i in range(1,27)}
N = int(input())
A = []
while N>0:
    a = N%26
    if a==0:
        a = 26
        A.append(D[26])
    else:
        A.append(D[a])
    N = (N-a)//26
A = A[::-1]
print("".join(A))

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 8)
ini = lambda: int(sys.stdin.readline())
inm = lambda: map(int, sys.stdin.readline().split())
inl = lambda: list(inm())
ins = lambda: sys.stdin.readline().rstrip()
debug = lambda *a, **kw: print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw))

N = ini()


def solve():
    k = 26
    a = 0
    l = 1
    while a + k < N:
        a += k
        k *= 26
        l += 1
    m = N - a - 1
    s = [None] * l
    for i in range(l):
        d = m % 26
        s[i] = chr(ord("a") + d)
        m //= 26
    return "".join(reversed(s))


print(solve())

Solution (Python):
import sys
from collections import defaultdict, deque, Counter
import math
 

from bisect import bisect_left, bisect_right

 

 

input = sys.stdin.readline
 
getS = lambda: input().strip()
getN = lambda: int(input())
getList = lambda: list(map(int, input().split()))
getZList = lambda: [int(x) - 1 for x in input().split()]
 
INF = 10 ** 20
MOD = 10**9 + 7
divide = lambda x: pow(x, MOD-2, MOD)

def getmoji(k):
    return chr(ord("a") + k)

def main():
    
    n = getN()
    
    n -= 1
    ans = []
    while(n>=0):
        ans.append(getmoji(n % 26))
        n //= 26
        n -= 1
        
    ans.reverse()
    print("".join(ans))



if __name__ == "__main__":
    main()

Solution (Python):
n = int(input())
x = [chr(i) for i in range(ord("a"), ord("z")+1)]
ans = []
while n > 26:
    ans.append(x[n%26-1])
    if n%26 == 0:
        n = n//26-1
    else: n //= 26
ans.append(x[n-1])
print("".join(ans[::-1]))

Solution (Python):
import os
import heapq
import sys
import math
import operator
from collections import defaultdict
from io import BytesIO, IOBase


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

"""def pw(a,b):
    result=1
    while(b>0):
        if(b%2==1): result*=a
        a*=a
        b//=2
    return result"""



def inpt():
    return [int(k) for k in input().split()]


def main():
    n=int(input())
    ar=[]
    while(n>0):
        n-=1
        ar.append(n%26)
        n//=26
    ar=ar[::-1]
    for i in ar:
        v=97+i
        print(chr(v),end='')
















BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")

if __name__ == "__main__":
    main()

Solution (Python):
a = int(input())
s = []
ret = ['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 a > 0:
    a -= 1  
    shang = int(a / 26)
    yushu = int(a % 26)
    
    s.append(yushu)  
    a = shang

s.reverse()

v = ''
for i in range(len(s)):
    v += ret[s[i]]
print(v)

Solution (Python):
a = int(input())
s = []
ret = ['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', 'z',
       ]
while a > 0:
    a -= 1
    shang = int(a / 26)
    yushu = int(a % 26)
    
    s.append(yushu+1)
    a = shang

s.reverse()

v = ''
for i in range(len(s)):
    v += ret[s[i]]
print(v)

Solution (Python):
s = raw_input()
n = int(s)

def main(n):
	d = 1
	n -= 1
	while n - 26**d >= 0:
		n -= 26**d
		d += 1
	ret = ''
	for i in range(d):
		ret += chr((n%26)+ord('a'))
		n //= 26
	return ret[::-1]

print main(n)

Solution (Python):

q = int(input())
ans = ""
 

while True:
  q, mod = divmod(q, 26)

  if mod == 0:
    mod = 26
    q -= 1
 
  num2alpha = lambda c: chr(c + 96)
  ans = num2alpha(mod) + ans
 
  if q == 0:
    break
 
print(ans)

Solution (Python):
def II(): return int(input())
ans=''
N=II()
N-=1
i=1
while N-26**i>=0:  
  N-=26**i
  i+=1
for j in range(i):
  div,mod=divmod(N,26)
  ans+=chr(mod+ord('a'))
  N=div
ans=ans[::-1]
print(ans)

Solution (Python):
def II(): return int(input())
ans=''
N=II()
N-=1
i=1
while N-26**i>=0:  
  N-=26**i
  i+=1
for j in range(i):
  mod=N%26
  ans+=chr(mod+ord('a'))
  N//=26
ans=ans[::-1]
print(ans)

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

for i in range(12):
  if (26**i - 1)//25 <= N and (26**(i+1) - 1)//25 > N:
    len = i
    
ans = ["a" for _ in range(len)]
k = N - (26**len - 1)//25 + 1
x = k-1

for j in range(len):
  ans[j] = chr(ord("a") + x%26)
  x = x // 26

print("".join(ans[::-1]))

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

n -= 1

a = []
while True:
  a.append(n % 26)
  n //= 26
  if not n:
    break
  n -= 1
name = ''.join([chr(ord('a') + c) for c in a])
print(name[::-1])

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

name1 = ['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']
name = ""
while n != 0:
    name = name1[(n%26)-1] + name
    n = (n-1) // 26

print(name)

Solution (Python):
num = 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(num).lower())

Solution (Python):
import string


def m():
    N = int(input())
    a2z = string.ascii_lowercase
    ans = ''
    while N != 0:
        N -= 1
        ans = a2z[N % 26] + ans
        N = N // 26
    return ans

print(m())

Solution (Python):
N = int(input())
ans = []
while N:
    N = N -1
    ans.insert(0, N % 26)
    N = N // 26

for i in ans:
    print(chr(97 + i), end="")

Solution (Python):
n = int(input())-1
q = []
while n >= 0:
    q.insert(0,n % 26)
    n = n // 26-1
ans = ''
for i in q:
    ans += chr(ord('a') + i)
print(ans)

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

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

name = ''

while N:
    N -= 1
    mod = N % 26
    name = chr(mod + ord('a')) + name
    N //= 26

print(name)

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


for i in range(1,15):
    if n <= 26 ** i:
        n -= 1
        for j in range(i):
            ans += (chr(n % 26 + 97))
            n //= 26
        break
    n -= 26 ** i

print(ans[::-1])

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

Solution (Python):
n = int(input())
l = 1
while n-26**l > 0:
    n -= 26**l
    l += 1
else:
    n -= 1
    res = ""
    for i in range(l):
        n,r = divmod(n,26)
        res += chr(ord("a")+r)
    ans = res[::-1]
print(ans)

Solution (Python):
n = int(input())
s = []
while n > 0:
    n -= 1
    s.append(chr(n % 26 + 0x61))
    n //= 26
print(''.join(reversed(s)))

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

import collections
import random

def linput(ty=int, cvt=list):
	return cvt(map(ty,input().split()))

def gcd(a: int, b: int):
	while b: a, b = b, a%b
	return a

def lcm(a: int, b: int):
	return a * b // gcd(a, b)

def dist(x1,y1,x2,y2):
	return abs(x1-x2)+abs(y1-y2)

def main():
	N = int(input())
	
	oA = ord("a")
	vD = [chr(i+oA) for i in range(26)]
	

	res = ""
	while N:
		
		res += vD[(N-1)%26]
		N -= 1
		N //= 26
	
	print(res[::-1])
	
	
	

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())
ans = []
while N:
    N -= 1
    N, r = divmod(N, 26)
    ans.append(chr(ord('a') + r))
print("".join(reversed(ans)))

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

while n:
    a = n%26
    s = al[a-1] +s
    
    if a == 0:
        n -=26
    n //=26

print(s)

Solution (Python):
n = int(input())
n -= 1
name = []
while n >= 0:
    modulo = n % 26
    name += chr(ord("a")+modulo)
    
    
    n = n // 26 - 1
print ("".join(reversed(name)))

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

if __name__ == "__main__":
    main()

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import time,random,resource

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


def main():
    n = I()

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

    n -= 1
    r = []
    for j in range(i):
        r.append(chr(ord('a') + n % 26))
        n //= 26

    return JA(r[::-1], '')


print(main())

Solution (Python):

def q3():
    Alphabet = ["dummy"] + [c for c in "abcdefghijklmnopqrstuvwxyz"]

    n = int(input())

    name = ""
    while True:
        if n <= 26:
            name = Alphabet[n] + name
            break
        n_c = n % 26
        if n_c == 0:
            name = "z" + name
            n = n // 26 - 1
        else:
            name = Alphabet[n_c] + name
            n = (n - n_c) // 26

    print(name)


q3()

Solution (Python):
q = int(input())
ans = ''
alphabet = 'zabcdefghijklmnopqrstuvwxy'
while True:
    r = q%26
    q = q//26 - 1 if r==0 else q//26
    ans =  alphabet[r]+ans
    if q<=0:
        break
print(ans)

Solution (Python):
q = int(input())
ans = ''
alphabet = 'zabcdefghijklmnopqrstuvwxy'
while True:
    r = q%26
    q = q//26 - 1 if r==0 else q//26
    ans = ans + alphabet[r]
    if q<=0:
        break
ans = ans[::-1]
print(ans)

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

dog_al = ''

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

print(dog_al[::-1])

Solution (Python):
n = int(input())
li = [chr(i) for i in range(ord('a'), ord('z') + 1)]
result=[]
n = n - 1

while True:
    s, t = n//26, n%26
    result.append(li[t])
    if s == 0:
        result = result[::-1]
        print("".join(result))
        break
    else:
        n = s-1

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

Solution (Python):
N = int(input())
result = ""
while N >= 1:
  result = chr(((int(N) -1) % 26) + ord('a')) + result
  N = (N-1) / 26
print(result)

Solution (Python):
N=int(input())
l = int(N**(1/26))
name = ''
while N >0:
    N -= 1
    r = N%26
    N = N//26
    name += chr(ord('a')+r)
print(name[::-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())
result = ""
while N >= 1:
  result = chr(((int(N) -1) % 26) + ord('a')) + result
  N = (N-1) / 26
print(result)

Solution (Python):
n = int(input())
ans = []
alpha = [chr(i) for i in range(97, 97+26)]
num = 0
rank = 0

for i in range(100):
    if num >= n:
        rank = i
        break

    num += 26 ** (i + 1)

num -= 26 ** rank
n -= num + 1
for i in range(rank):
    ans.append(alpha[n % 26])
    n = n // 26

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

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

Solution (Python):
N = int(input())
q = [0]*13
i = 10
n = N
cflag = 0
zflag = 0
str = []
while i != -1:
    q[i] = n // 26 ** i
    mod = n % 26 ** i
    n = mod
    i -= 1
for i in range(12):
    if q[i] == 0:
        zflag = 1
        for j in range(i,13) :
            if q[j] != 0:
                zflag = 0
                break
        if zflag == 1:
             break
        elif cflag == 1:
            str.append("y")
            cflag = 1
        else:
            str.append("z")
            cflag = 1
    elif q[i] == 1 and cflag == 1:
        zflag = 1
        for j in range(i+1,13):
            if q[j] != 0:
                zflag = 0
                break
        if zflag == 1:
            break
        else:
            str.append ("z")
            cflag = 1
    else:
        str.append(chr(q[i] + 96 -cflag))
        cflag = 0

i = len(str) -1
while i >= 0:
    if[str] == '':
        i-=1
        continue
    elif i == 0:
        print(str[i])
        break
    else:
        print(str[i], end="")
        i -= 1

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

for _ in range(10**5):
	N-=1
	ans+=chr(ord("a")+(N%26))
	N=N//26
	if N<=0:
		break

print(ans[::-1])

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

name = ''
while True:
  rem = (N-1) % 26
  name += chr(rem + ord('a'))
  N = (N-1) // 26
  if N == 0:
    break

print(name[::-1])

Solution (Python):
n = int(input())
stock = [chr(i) for i in range(97, 97 + 26)]
full, count, j = 26, 1, 1
while (count + full <= n):
    count += full;    j += 1;    full *= 26
q = n - count
s = []
for k in range(j):
    s.append(stock[q % 26])
    q //= 26
print("".join(s[::-1]))

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

print("".join(ans[::-1]))

Solution (Python):
n=int(input())
s='zabcdefghijklmnopqrstuvwxy'
a=''
while(int(n)>0):
        t=n%26
        if t==0:
            n-=26
        a=s[t]+a
        n=n//26
print(a)

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

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

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

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

print(s)

Solution (Python):


alpha = ['Z']
alpha.extend([chr(ord('a') + i) for i in range(26)])
N = int(input())
q = N
ans = ''
while True:
    if q <= 26:
        ans += str(alpha[q])
        break
    else:
        q, mod = divmod(q, 26)
        if mod == 0:
            q -= 1
            mod = 26
        ans += str(alpha[mod])

print(ans[::-1])

Solution (Python):
import sys
n = int(sys.stdin.readline())
ans = ""
x = n
while n >= 26:
  n, mod = divmod (n-1, 26)
  ans =  chr(ord("a") + mod) + ans
if n != 0:
  ans =  chr(ord("a") + n - 1) + ans
print (ans)

Solution (Python):
import math
n = int(input())
ls = "abcdefghijklmnopqrstuvwxyz"
cnt = 0
base = 26
while n >= base ** cnt:
    n -= base ** cnt
    cnt += 1
ans = ""

for i in range(cnt-1, -1, -1):
    res = n // (base ** i)
    ans += ls[res]
    n -= base ** i * res
print(ans)

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 = ""
while n >= 26:
  n, mod = divmod(n-1, 26)
  ans = chr(ord("a")+mod) + ans
if n != 0:
  ans = chr(ord("a")+n-1) + ans

print(ans)

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

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

ans = ''.join(l)[::-1]
print(ans)

Solution (Python):
def II(): return int(input())
N=II()
N-=1
i=1
while N>=(26**i):
  N-=26**i
  i+=1
ans=''
for j in range(i):
  q,mod=divmod(N,26)
  ans=ans+chr(mod+ord('a'))
  N=q
ans=ans[::-1]
print(ans)