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

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):
from collections import deque

ii = lambda:int(input())
mi = lambda:list(map(int,input().split()))
ix = lambda x:list(input() for _ in range(x))
mix = lambda x:list(mi() for _ in range(x))
iix = lambda x:list(int(input()) for _ in range(x))


def resolve():
    n = ii()
    que = deque()

    val = n
    while val != 0:
        val, m = divmod(val,26)
        if m == 0:
            val -= 1
            m = 26
        que.append(m)
    res = ""
    for i in que:
        res = chr(ord("a")+i-1) + res
    print(res)

if __name__ == "__main__":
    resolve()

Solution (Python):
def C():
    n = int(input())
    ret = [None]*12
    q = n
    for i in range(12):
        q,mod = divmod(q,26)
        if mod == 0:
            ret[i] = "z"
            q -= 1
        else:
            ret[i] = chr(mod+96)
        if q == 0:
            break
    ret = ret[:i+1]
    ret.reverse()
    print("".join(ret))
C()

Solution (Python):
def C():
    n = int(input())
    ret = [None]*12
    q = n
    for i in range(12):
        q,mod = divmod(q,26)
        if mod == 0:
            ret[i] = "z"
            q -= 1
        else:
            ret[i] = chr(mod+96)
        if q == 0:
            break
    ret = ret[:i+1]
    ret.reverse()
    print("".join(map(str,ret)))
C()

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

ans = ""
while N > 0:
  x = (N-1) % 26

  ans = chr(ord('a') + x) + ans
  N = (N-1) // 26

print(ans)

Solution (Python):
import string
N = int(input())
ANS =[]
while N>0:
    M=int(N%26)
    if M==0:
        M=26
    ANS.insert(0,string.ascii_lowercase[M-1])
    N=N-M
    N=N/26
    
map = map(str,ANS)
print(''.join(map))

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

ans = ""
while N > 0:
  x = (N-1) % 26

  ans = chr(ord('a') + x) + ans
  N = (N-1) // 26
  
print(ans)

Solution (Python):



n=int(input())
alpha=[chr(i) for i in range(ord('a'),ord('z')+1)]
ans=''
while n>0:
    n-=1
    ans=alpha[n%26]+ans
    n//=26
print(ans)

Solution (Python):
n = int(input())
c = 1
s = 26
while True:
    if n <= s:
        break
    c += 1
    s += 26 ** c
a = ""
al = 'abcdefghijklmnopqrstuvwxyz'
for i in range(1,c+1):
    a += al[(n - 1) % 26]
    n = (n - 1) // 26
print(a[::-1])

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

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

def Base_10_to_n(X, n):
    X_dumy = X
    out = ''
    while X_dumy>0:
        if X_dumy%n!=0:
            out = str(chr(X_dumy%n+ord('a')-1))+out
            X_dumy = int(X_dumy/n)
        else:
            out = str(chr(n+ord('a')-1))+out
            X_dumy = int(X_dumy/n)-1
    return out
    
ans = Base_10_to_n(n, 26)
print(ans)

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())
 
ABC = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
ANS=[]
ANS_N=[]
 
while N != 0:
  N -= 1
  ANS.append(N%26)
  N = N // 26
 
for i in range(len(ANS)):
  ANS_N.append(ABC[ANS[i]])
 
ans = "".join(reversed(ANS_N))
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):
n = int(input())

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

Solution (Python):
mod = int(1e9+7)
def add(a, b):
    c = a + b
    if c >= mod:
        c -= mod
    return c

def main():
    
    N = int(raw_input())
    
    temp = []
    
    while N > 0:
        
        ch = ' '
        if N % 26 == 0:
            ch = 'z'
        else:
            ch = chr(ord('a') + (N % 26) - 1)
        temp.append(ch)
        N = (N - 1) // 26
    
    ans = ''.join(reversed(temp))
    
    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())
ans = ""
while N>0:
    N -= 1
    s = N%26
    ans += chr(s + 97)
    N = (N-s)//26
print(ans[::-1])

Solution (Python):

def get_alphabet(mod):
	import string
	lower = string.ascii_lowercase
	
	if mod == 0 or mod == 26:
		return 'z'
	else:
		return lower[mod - 1]


n = int(input())

ans = ''

while n > 26:
	mod = n % 26
	s = get_alphabet(mod)
	ans = s + ans
	n //= 26
	
	if mod == 0:
		n -= 1
	
ans = get_alphabet(n) + ans
print(ans)

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

tmp=0
for ll in range(1,20):
  tmp+=26**ll
  if n<=tmp:
    break

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

print(s[::-1])

Solution (Python):

import sys
input = lambda: sys.stdin.readline().strip()
n = int(input())
b = 26
d = 0
digs = 1
while d + b < n:
    d += b
    b *= 26
    digs += 1
n -= d + 1
ans = []
while n > 0:
    ans.append(chr(ord('a') + n % 26))
    n //= 26
while len(ans) < digs:
    ans.append('a')
print(''.join(reversed(ans)))

Solution (Python):

n = int(input())
dic = dict()

import string
i = 1

for s in string.ascii_lowercase:
	dic[i % 26] = s
	i += 1	

name = ''
i = 1

while True:
	mod = n % 26
	name += dic[mod]
	
	if n > 26:
		if mod == 0:
			mod = 26
		
		n = (n - mod) // 26
		i += 1
	else:
		break

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

Solution (Python):
from collections import Counter
from collections import defaultdict
from collections import deque
from functools import reduce
import math
import itertools
import heapq

import bisect
import sys

sys.setrecursionlimit(10**6)


def bfs(s, n, node):
    
    check = [False for _ in range(n)]
    check[s] = True
    
    queue = deque([s])
    visited_num = 1

    
    
    color = [-1 for _ in range(n)]
    color[s] = 0

    while visited_num < n:
        
        if len(queue) == 0:
            
            
            return color

        now_vertex = queue.popleft()
        
        for next_vertex in node[now_vertex]:

            if check[next_vertex] == True:
                continue

            queue.append(next_vertex)
            check[next_vertex] = True

            
            color[next_vertex] = color[now_vertex]+1
            visited_num += 1

    return color


mod = 10**9+7



def ceil(x, y): return (x+y-1)//y
def input_list(): return list(map(int, input().split()))


n = int(input())
n -= 1
num = 26
ans = []
while n >= num:
    k = n % num
    ans.append(k)
    n //= num
    n -= 1
ans.append(n)

ans = (list(map(lambda x: chr(x+ord("a")), ans)))
print("".join(ans)[::-1])

Solution (Python):
import bisect
n = int(input())
x = [0]
while x[-1] < 1000000000000001:
    x.append(x[-1]+26**(len(x)))
d = 'abcdefghijklmnopqrstuvwxyz'
digits = bisect.bisect_left(x,n)
num = n - x[digits-1]-1
ans = ""
for i in range(digits):
    ans = ''.join([d[num%(26)],ans])
    num = num//26
print(ans)

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

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

name = converter(x)

print(name)

Solution (Python):
n = int(input())
c = ''
while n>0:
    n-=1
    c+=chr(ord('a')+n%26)
    n//=26
print(c[::-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(num2alpha(n).lower())

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

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

ans = ''
while True:
    ans+=toa(n%26)
    n = n//26 -1
    if n<0:
        break
print(ans[::-1])

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

tmp = 0
i = -1
tmp_list= []
while tmp<=n:
  i+=1
  tmp+=26**i
  tmp_list.append(26**i)
n-=(tmp-tmp_list[-1])

tmp = []
while 1:
  if n<26:
    tmp.append(n%26)
    break
  tmp.append(n%26)
  n = n//26
alphabet = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]

result = ""
for arg in reversed(tmp):
  result += alphabet[arg]

for _ in range(i-len(result)):
  result = "a"+result
print(result)

Solution (Python):
import sys
import math
import collections

def set_debug(debug_mode=False):
    if debug_mode:
        fin = open('input.txt', 'r')
        sys.stdin = fin


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


def get(s):
    return str(s % 9) + '9' * (s // 9)

if __name__ == '__main__':
    

    
    t = 1

    for ti in range(1, t + 1):
        n = int(input())

        res = ''

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

        print(res[::-1])

Solution (Python):
'''
参考:1
https://tanuhack.com/num2alpha-alpha2num/
数値からアルファベットの変換…10進数→26進数
-----
例えば、『1000』という数値をアルファベットに変換させる場合、
1. 26のn乗で1000以下の最大のnを求める→『n+1』がアルファベットの桁数、n=2
2. (26^2)*xで1000以下の最大のxを求める→x=1、つまり3桁目のアルファベットはA
3. (26^1)*yで1000-(26^2)*1=324以下の最大のyを求める→y=12、つまり2桁目のアルファベットはL
4. (26^0)*z=12→つまり3桁目のアルファベットはL、ゆえに1000はALL
と、再帰を使って算出
-----

参考:2
https://note.nkmk.me/python-chr-ord-unicode-code-point/
整数（Unicodeコードポイント）→文字
'''
def num2alpha(num):
    if num <= 26:                                   
        return chr(96+num)                          
    elif num % 26 == 0:                             
        return num2alpha(num//26-1)+chr(122)        
    else:                                           
        return num2alpha(num//26)+chr(96+num%26)    


N = int(input())
ans = num2alpha(N)

print(ans)

Solution (Python):
def main():
    N = int(input())
    ans = ''
 
    while N > 0:
        N -= 1
        ans += chr(ord('a') + N % 26).lower()
        N = N // 26
    print(ans[::-1])
 
 
if __name__ == "__main__":
    main()

Solution (Python):
import sys
sys.setrecursionlimit(10**7) 
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):
def main():
    N = int(input())
    ans = ''

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


if __name__ == "__main__":
    main()

Solution (Python):
def main():
    N = int(input()) - 1
    digits = []

    while True:
        a, b = N // 26, N % 26
        digits.append(b)
        if a == 0:
            break
        N = a - 1

    digits.reverse()
    chars = map(to_alphabet, digits)
    print(''.join(chars))


def to_alphabet(x: int):
    return chr(65 + x).lower()


if __name__ == "__main__":
    main()

Solution (Python):
def main():
    N = int(input()) - 1
    digits = []

    while True:
        a, b = N // 26, N % 26
        if a == 0:
            digits.append(b)
            break
        digits.append(b)
        N = a - 1

    digits.reverse()
    chars = map(to_alphabet, digits)
    print(''.join(chars))


def to_alphabet(x: int):
    return chr(65 + x).lower()


if __name__ == "__main__":
    main()

Solution (Python):
n = int(input())
s=''
while n!=0:
  n-=1
  tmp=n%26
  s=chr(96+tmp+1)+s
  n//=26
print(s)

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees, log2, gcd
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7



N = INT()

ans = ""
while 0 < N:
	N -= 1
	ans += ascii_lowercase[N%26]
	N //= 26

print(ans[::-1])

Solution (Python):
import sys
def input():
    return sys.stdin.readline().rstrip('\n')
    

def calc(N):
    abc = 'abcdefghijklmnopqrstuvwxyz'
    s = ''
    while N > 0:
        i = (N - 1) % 26
        N = (N - 1) // 26
        s = abc[i] + s
    return s

N = int(input())
print(calc(N))

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

Solution (Python):

def s0():return input()
def s1():return input().split()
def s2(n):return [input() for x in range(n)]
def s3(n):return [input().split() for _ in range(n)]
def s4(n):return [[x for x in s] for s in s2(n)]
def n0():return int(input())
def n1():return [int(x) for x in input().split()]
def n2(n):return [int(input()) for _ in range(n)]
def n3(n):return [[int(x) for x in input().split()] for _ in range(n)]
def t3(n):return [tuple(int(x) for x in input().split()) for _ in range(n)]
def p0(b,yes="Yes",no="No"): print(yes if b else no)








n=n0()


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):
n=int(input())
ans=[]

while n!=0:
  n=n-1
  ans.append(chr(n%26+97))
  n=n//26
ans.reverse()
print("".join(ans))

Solution (Python):
def A(x):
  if ord(x) - ord('a') >= 0:
    print('a')
  else:
    print('A')


def B(n, k, p_list):
  p_list = sorted(p_list)
  print(sum(p_list[:k]))


def C(N):
  for i in range(99):
    if N < 26**i:
      ans = []
      for j in range(i):
        ans += chr(ord('a') + N % 26)
        N //= 26
      return ''.join(ans[::-1])
    else:
      N -= 26**i


def main():
  
  
  
  

  
  
  
  print(C(int(input())))
  
  
  
  
  


if __name__ == '__main__':
  main()

Solution (Python):
N=int(input())
START = 96
ALP = 26
ans = []
while True:
  if N <= ALP:
    ans.append(chr(START + N)) 
    break
  p = N % ALP
  if p == 0:
    ans.append(chr(START + ALP))
  else:
    ans.append(chr(START + p))
  if p == 0:
    N -= 1
  N = N // ALP
print(''.join(ans[::-1]))

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


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

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

    print(ans)




if __name__ == '__main__':
    main()

Solution (Python):
def main():
    from string import ascii_lowercase

    N = int(input())

    def rec(n):
        if n == 0: return ''
        n -= 1
        n, r = divmod(n, 26)
        return rec(n) + ascii_lowercase[r]

    print(rec(N))


if __name__ == '__main__':
    main()

Solution (Python):









import sys

def input(): return sys.stdin.readline()
def iIn(): return int(input())
def iInM(): return map(int, input().split())
def iInM1(): return map(int1, input().split())
def iInLH(): return list(map(int, input().split()))
def iInLH1(): return list(map(int1, input().split()))
def iInLV(n): return [iIn() for _ in range(n)]
def iInLV1(n): return [iIn()-1 for _ in range(n)]
def iInLD(n): return [iInLH() for _ in range(n)]
def iInLD1(n): return [iInLH1() for _ in range(n)]
def sInLH(): return list(input().split())
def sInLV(n): return [input().rstrip('\n') for _ in range(n)]
def sInLD(n): return [sInLH() for _ in range(n)]

OutV = lambda x: print(*x, sep='\n')

sys.setrecursionlimit(10 ** 6)

int1 = lambda x: int(x) - 1

INF = int(1e9)
MOD = 1000000007
dx = (-1, 0, 1, 0)
dy = (0, -1, 0, 1)







def Base_10_to_n(X, n):
    digit = len(str(n - 1))
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n).zfill(digit)
    return str(X%n).zfill(digit)

import string
alphabet = list(string.ascii_lowercase)


N = iIn()

s = Base_10_to_n(N, 26)

lst = []
for i in range(len(s)//2):
    var = s[2*i] + s[2*i+1]
    lst.append(int(var))
lst = lst[::-1]


solver = []
for i in range(len(lst)):
    if lst[i] > 0:
        solver.append(lst[i])
    else:
        if i == len(lst) - 1:
            break
        lst[i+1] -= 1
        solver.append(lst[i]+26)
solver = solver[::-1]

ans = ''
for i in range(len(solver)):
    ans += alphabet[solver[i]-1]

print(ans)

Solution (Python):
n = int(input())
n -= 1
a = 0
dig = 1
while a + 26**dig <= n:
    a += 26**dig
    dig += 1
n -= a
ans = []
for i in range(dig):
    ans += [chr(n % 26 + 97)]
    n //= 26
print(''.join(reversed(ans)))

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())
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())
a=26
ans=''
while N>0:
	N-=1
	ans+=chr(ord('a')+N%a)
	N//=a
print(ans[::-1])

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

Solution (Python):
name = ["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"]
NUM = 26
id = ""
N = int(input())

while True:
  q = N // NUM
  mod = N % NUM
  if mod == 0:
    q = q-1
    mod = 26
  else:
    None

  id = name[mod-1]+id
  if q <= 0:
    break
  
  if q <= 26 and q > 0:
    id = name[q-1]+id
    break
  else:
    N = q
  
print(id)

Solution (Python):
import math
n=a=int(input())
len=0
while a>=1:
  a=math.ceil(a/26)
  a-=1
  len+=1
  n-=26**len
n+=26**len-1
dp=[0]*len

for i in range(len):
  s=26**(len-i-1)
  dp[i]=chr(n//s+ord("a"))
  n-=26**(len-i-1)*(n//s)
print("".join(dp))

Solution (Python):
n = int(input())
s=''
k=1
while n>0:
    if n-26**k>0:
        n-=26**k
        k+=1
    else:
        p='abcdefghijklmnopqrstuvwxyz'
        
        j=0
        while n>0:
            if n-26**(k-1)>0:
                n-=26**(k-1)
                j+=1
            else:
                s+=p[j]
                
                if n==1 and k==1:
                    n=0
                j=0
                k-=1
                
                
print(s)

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=''
check='abcdefghijklmnopqrstuvwxyz'
while n!=0:
  n-=1
  ans+=check[n%26]
  n//=26
print(ans[::-1])

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

S = []

if N <= 26:
    amari = N % 26
    S.append(amari)
else:
    while N != 0:
        amari = N % 26
        if amari == 0:
            S.append(26)
            N = (N-1)//26
        else:
            S.append(amari)
            N = N//26

S.reverse()
Moji = ''
for i in range(len(S)):
    Moji = Moji + A[S[i]-1] 
print(Moji)

Solution (Python):
n=int(input())
num=[]
while n!=0:
    n-=1
    p=n%26
    n=n//26
    num.append(p)
c=[]
for i in range(len(num)-1,-1,-1):
    c.append(chr(ord("a")+num[i]))
print("".join(c))

Solution (Python):
import string
def frac(digit,n):
  ans[digit]=n%26
  if n < 26:
    return
  else:
    frac(digit+1,n//26)
    return

n = int(input())
l=0
r=0
for i in range(1,10000000000000000000000):
  l = r+1
  r = l+26**i-1
  if l <= n <= r:
    n = n-l+1
    break

n=n-1
ans=[0]*i

frac(0,n)
res=""
for i in ans[::-1]:
  res+=string.ascii_lowercase[i]
print(res)

Solution (Python):
import math

N = int(input())

group_seq_index = math.ceil(math.log(25*N/26+1)/math.log(26))
char_li = [chr(i) for i in range(97,97+26)]
li = []
a = ''

N -= int((1 - 26 ** (group_seq_index + 1)) / -25)

for i in range(group_seq_index):
  li.append(N % 26)
  N = N // 26

for index in reversed(li):
  a += char_li[index]
  
print(a)

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

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

def main():
    N = int(readline())
    print(num2alpha(N).lower())

if __name__ == '__main__':
    main()

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):
def int2char(i):
    return chr(ord("a") + i - 1)

N = int(input())

ans = ""
while (True):
    N_lsb_int = ((N - 1) % 26) + 1
    N_next = int((N - N_lsb_int)/26)
    ans = int2char(N_lsb_int) + ans
    if N_next == 0:
        break
    N = N_next

print(ans)

Solution (Python):
import sys

def main(n):
    c = "abcdefghijklmnopqrstuvwxyz"
    m = {}
    for i in range(0, 26):
        m[i+1] = c[i]

    s = ""
    while n > 0:
        if n%26 == 0:
            t = 26
            n //= 26
            n -= 1
        else:
            t = n%26
            n //= 26
        s = m[t] + s
    return s

n = int(sys.stdin.readline().strip())
print(main(n))

Solution (Python):
import string

def main(N):
    if N <= 26:
        return string.ascii_lowercase[N-1]
    if N % 26 == 0:
        return main(N//26 - 1) + string.ascii_lowercase[25]
    return main(N//26) + string.ascii_lowercase[N%26 - 1]

N = int(input())
print(main(N))

Solution (Python):
n = int(input())
p = 26
while n > p:
  n -= p
  p *= 26

n -= 1
s = ''
while p > 1:
  n, r = divmod(n, 26)
  s = chr(97 + r) + s
  p //= 26
print(s)

Solution (Python):
N=int(input())
for i in range(1,15):
    if 26**i>=N:
        n=i
        break
    else:
        N-=26**i
l=[0]*n
N-=1
for i in range(n):
    l[i]=N%26
    N//=26
for i in l[::-1]:
    print(chr(ord("a")+i),end="")

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

Solution (Python):
from string import ascii_lowercase
N = int(input())
s = list()

while N > 0: 
	N -= 1
	m = N%26 
	s.append(ascii_lowercase[m])

	N = int(N/26)

	
s.reverse()
s = ''.join(s)
print(s)

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

Solution (Python):
N = int(input())
abc = '_abcdefghijklmnopqrstuvwxyz'
name = ''

def get_name(N):
    if N<=26:
        return abc[N]
    else:
        N_sub = (N-1)%26 + 1
        sub_name = abc[N_sub]
        N_new = (N - N_sub)//26
        return get_name(N_new) + sub_name
print(get_name(N))

Solution (Python):
n=int(input())
l=[]
while(n!=0):
    n=n-1
    l.append(chr(ord('a')+(n%26)))
    n=int(n/26)
l=l[::-1]
print("".join(l))

Solution (Python):



N = int(input())


alphabet = "zabcdefghijklmnopqrstuvwxy"
ans = ""


if N>=1 and N<=26:
    ans = alphabet[N%26]
else:
    while N>0:
        if N%26==0:
            ans += alphabet[0]
            N = N // 26 -1
        else:
            ans += alphabet[N%26]
            N = N // 26


ans = ans[::-1]
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())
lst = list()
 
while True:
  a, b = divmod(n, 26)
  n = a
  lst.append(b)
  if a == 0:
    break
 
for i in range(len(lst) - 1):
  if lst[i] <= 0:
    lst[i] += 26
    lst[i + 1] -= 1
 
if lst[-1] == 0:
  lst.pop()
 
for i in range(len(lst)):
  lst[i] = chr(lst[i] + 96)
 
print("".join(lst[::-1]))

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

def main():
    mod=10**9+7
    N=I()
    ans=[]
    for i in range(100):
        temp=(N-1)%26+ord("a")
        s=chr(temp)
        ans.append(s)
        N=(N-1)//26
        if N==0:
            break
        
    print(''.join(map(str, ans[::-1])))

main()

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


if __name__ == '__main__':
    main()

Solution (Python):
def main():
    n = int(input())
    base = 26
    orig = ord('a')
    ans = ''
    for exp in range(1, 12):
        if (tmp := pow(base, exp)) >= n:
            n -= 1  
            for digit in range(exp):
                ans += (chr(orig + n % base))
                n //= base
            break
        else:
            n -= tmp
    print(ans[::-1])


if __name__ == '__main__':
    main()

Solution (Python):
from collections import deque


def main():
    n = int(input())
    base = 26
    orig = ord('a')
    ans = deque()
    for exp in range(1, 12):
        if (tmp := pow(base, exp)) >= n:
            n -= 1  
            for digit in range(exp):
                ans.appendleft(chr(orig + n % base))
                n //= base
            break
        else:
            n -= tmp
    print(''.join(ans))


if __name__ == '__main__':
    main()

Solution (Python):
a = 'abcdefghijklmnopqrstuvwxyz'
n = int(input())
r = 26
d = 1
while n-r > 0:
    n -= r
    r *= 26
    d += 1
n -= 1
name = ''
for i in range(d):
    if n >= 26:
        name = a[n % 26]+name
        n //= 26
    elif n > 0:
        name = a[n]+name
        n = 0
    else:
        name = a[n]+name
print(name)

Solution (Python):
N=int(input())
P=["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 N>0:
  t=(N-1)%26
  ans.append(P[t])
  N=int((N-t)/26)
  continue
ans=ans[::-1]
print("".join(ans))

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())
ans = ""
while n > 0:
    n -= 1
    ans += chr(ord('a') + n%26)
    n //= 26
 
print(ans[::-1])

Solution (Python):
import sys
INF = 1 << 60
MOD = 10**9 + 7 
sys.setrecursionlimit(2147483647)
input = lambda:sys.stdin.readline().rstrip()
def resolve():
    n = int(input())
    res = []
    while n:
        n, r = divmod(n - 1, 26)
        res.append(chr(ord('a') + r))
    res.reverse()
    print(''.join(res))
resolve()

Solution (Python):
def INT():
    return int(input())

def MI():
    return map(int, input().split())

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

from string import ascii_lowercase

al = ascii_lowercase

N = INT()
ans = []

while N > 0:
    N -= 1
    ans.append(al[N % 26])
    N //= 26
    
ans.reverse()
print("".join(map(str, ans)))

Solution (Python):
import sys
sys.setrecursionlimit(10**7)

readline = sys.stdin.buffer.readline
def readstr():return readline().rstrip().decode()
def readstrs():return list(readline().decode().split())
def readint():return int(readline())
def readints():return list(map(int,readline().split()))
def printrows(x):print('\n'.join(map(str,x)))
def printline(x):print(' '.join(map(str,x)))

n = readint()

a = ['z'] + [chr(ord('a')+i) for i in range(25)]
ans = []
while n:
    ans.append(a[n%26])
    n = (n-1)//26

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

Solution (Python):
import sys
sys.setrecursionlimit(10**7)

readline = sys.stdin.buffer.readline
def readstr():return readline().rstrip().decode()
def readstrs():return list(readline().decode().split())
def readint():return int(readline())
def readints():return list(map(int,readline().split()))
def printrows(x):print('\n'.join(map(str,x)))
def printline(x):print(' '.join(map(str,x)))

n = readint()

a = ord('a')-1
ans = []
i = 1
while n:
    if n%26==0:
        ans.append('z')
        n = n//26-1
    else:
        ans.append(chr(n%26+a))
        n//=26

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

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

l = []

for _ in range(20):
  rem = n % 26
  l.append(rem - 1 if rem else 25)
  n = (n - 1) // 26
  if n == 0:
    break;

l.reverse()
print("".join([alphabet[i] for i in l]))

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())
alp = [chr(i) for i in range(97, 97+26)]
edge = [0] * 15
for i in range(1, 15):
    edge[i] = edge[i - 1] + pow(26, i)

d = 0
length = 0
for e in edge[::-1]:
    if n - e > 0:
        d = n - e - 1 
        length = edge.index(e) + 1 
        break

digit = []
for _ in range(length):
    digit.append(d % 26)
    d //= 26

res = ''
for di in digit:
    res += alp[di]

print(res[::-1])

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):
N = int(input())
ans = ''
while N > 0:
  N -= 1
  ans += chr(ord('a') + N % 26)
  N //= 26
print(ans[::-1])