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

x = 26

ans = ""
while n:
    n -= 1
    ans += chr(ord("a") + (n % x))
    n //= x

print(ans[::-1])

Solution (Python):
N=int(input())
alphabet=[chr(i) for i in range(97,123)]
ans=""
while N>0:
    N-=1
    ans=chr(97+(N%26))+ans
    N//=26
print(ans)

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

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

Ans = []
while N > 0:
    N -= 1
    Ans.append(chr(97 + N % 26))
    N //= 26
print(''.join(Ans[::-1]))

Solution (Python):
def main():
    alphabet = list(chr(i)for i in range(97, 123))
    n = int(input())
    ans = ''
    while n > 0:
        n -= 1
        ans = chr(ord('a') + (n % 26)) + ans
        n = n//26

    print(ans)


if __name__ == "__main__":
    main()

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

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

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

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

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

q, mod = divmod(n-1, 26)
answer = data[mod]

while q >= 1:
    q, mod = divmod(q-1, 26)
    answer = data[mod] + answer

print(answer)

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

S = 1
i = 0
Sum = 0
while Sum<N:
    S *= 26
    Sum += S
    i = i+1


ans = []
for j in range(i):
    N -= 1
    r = N%26
    ans.insert(0, name[r])
    N = N//26

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

Solution (Python):
n=int(input())
p=1
while n > 0:
  n-=26**p
  p+=1
else:
  p-=1
  if n==0:
    ans="z"*p
    print(ans)
  else:
    n+=26**p
    num=[]
    for i in range(1,p+1):
      if n%(26**(p-i))==0:
        a=int(n/(26**(p-i)))-1
        q=p-i
        num.append(a)
        break
      else:
        a=n//(26**(p-i))
        num.append(a)
        n-=a*(26**(p-i))
    al=[]
    if n==0:
      for i in range(p-1):
        m=chr(97+num[i])
        al.append(m)
      al.append(chr(96+num[p-1]))
      ans=''.join(al)
    else:
      for i in num:
        m=chr(97+i)
        al.append(m)
      al.append("z"*q)
      ans=''.join(al)
    print(ans)

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

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

print(ans[::-1])

Solution (Python):


def II(): return int(input())
def MII(): return map(int, input().split())
def LII(): return list(map(int, input().split()))

def main():
    N = II()

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

    print(ans[::-1])

if __name__ == '__main__':
    main()

Solution (Python):
n=int(input())
def alpha2num(alpha):
    if alpha<=26:
        return chr(64+alpha)
    elif alpha%26==0:
        return alpha2num(alpha//26-1)+chr(90)
    else:
        return alpha2num(alpha//26)+chr(64+alpha%26)
print(alpha2num(n).lower())

Solution (Python):
kigou=list("abcdefghijklmnopqrstuvwxyz")
a=int(input())
keta=0
count=0
for i in range(1,100):
    x=26**i+count
    if 26**i+count>=a:
      keta=i
      break
    else:
        count+=26**i

ans=""

for i in range(keta):
    r=(a-1)%26
    ans=kigou[r]+ans
    a=(a-r)//26

print(ans)

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

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

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

Solution (Python):
M = 100
po = [26 ** i for i in range(M)]

N = int(input())

L = 0
for i in range(M):
    if N < po[i]:
        L = i
        break
    N -= po[i]

ans = ""
for i in range(L):
    ans += chr(ord('a') + N // po[L - (i + 1)])
    N %= po[L - (i + 1)]

print(ans)

Solution (Python):
import os
with open('dc_no_koodo.jpg.exe','w') as f:
  f.write(f'{input()}[1-26~rd0<fr97+P]dsfx')
os.system('dc < dc_no_koodo.jpg.exe')

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())
s=''
while n:
 n-=1
 s+=chr(n%26+97)
 n//=26
print(s[::-1])

Solution (Python):
N = int(input())
count = 0
ans = list()
r = 0
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']
d = -1


while N > 26**count + d:
    count+=1
    d = 26**(count-1) + d


count = count - 1
count2 = count

while count > 0:
    
    N = N - 26**count
    
    count = count - 1



N = N - 1

A = 1
while N > 0:
    A = N // 26
    B = N % 26
    
    ans.append(B)
    
    N = A





while len(ans) < count2 + 1:
    ans.append(0)
    




ans.reverse()


for i in range(0, len(ans)):
    ans[i] = alp[ans[i]]



print(''.join(ans))

Solution (Python):
from collections import defaultdict as dd
from collections import deque
import bisect
import heapq

def ri():
    return int(input())

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


def solve():
    n = ri()
    n -= 1
    out = ""
    while n >= 0:
        n, r = divmod(n, 26)
        n -= 1
        out = chr(ord('a') + r) + out
    print (out)






mode = 's'

if mode == 'T':
    t = ri()
    for i in range(t):
        solve()
else:
    solve()

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

Solution (Python):

import sys
import math
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import itertools
from decimal import *

input = sys.stdin.readline

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
def inputStr(): return input()[:-1]

inf = float('inf')
mod = 1000000007




def main():
	N = inputInt()
	ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
	soezi = [i for i in range(26)]
	soezi = [26] + soezi

	ans = ""
	tmp = N
	while True:
		if tmp == 0:
			break
		tmp2 = tmp % 26
		ans = ascii_lowercase[tmp2-1] + ans

		tmp = tmp - soezi[tmp2]
		tmp = tmp // 26

	print(ans)





if __name__ == "__main__":
	main()

Solution (Python):




n = int(input())

digits = []

while n > 0:
    n -= 1
    digits.append(chr(n%26+97))
    n //= 26

print(''.join(reversed(digits)))

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())
a = list('abcdefghijklmnopqrstuvwxyz')
name = 0
while N!=0:
  N-=1
  M = N%26
  N = N//26
  if name ==0:
    name = a[M]
  else:
    name = a[M]+name

print(name)

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

Solution (Python):
alp=[chr(i) for i in range(97,123)]
n=int(input())

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

n-=1
lst=[]

for i in range(keta):
    p,n=divmod(n,26**(keta-i-1))
    lst.append(alp[p])
    
print("".join(lst))

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 string
lc = string.ascii_lowercase
n = int(input())

lst = [0]
for i in range(1, 100000):
    tmp = pow(26, i)
    lst.append(tmp)
    if tmp > n:
        break
cum = [lst[0]]
for i in range(1, len(lst)):
    cum.append(cum[-1] + lst[i])
idx = 0
while True:
    if n-1 < cum[idx]:
        break
    idx += 1
num = n - cum[idx-1] - 1
ans = ''
for i in range(idx)[::-1]:
    tmp = pow(26, i)
    k = num // tmp
    num = num - tmp *k
    ans += lc[k]
print(ans)

Solution (Python):

import sys
import math
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import itertools
from decimal import *

input = sys.stdin.readline

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
def inputStr(): return input()[:-1]

inf = float('inf')
mod = 1000000007




def main():
	N = inputInt()

	print(num2alpha(N).lower())


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)



if __name__ == "__main__":
	main()

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

ans = []
while n >= 0:
    n, y = divmod(n, 26)
    ans.append(y)
    n -= 1
print(''.join(map(lambda x: chr(x+ord('a')), ans[::-1])))

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

Solution (Python):
def convert(n):
    tmp = 26 if n % 26 == 0 else n % 26
    if n == tmp:
        return chr(tmp + 64)
    return convert((n - tmp) // 26) + chr(tmp + 64)


N = int(input())
print(convert(N).lower())

Solution (Python):
n = int(input())
s_list = [chr(i) for i in range(97, 97+26)]
ans = ''

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

print(ans)

Solution (Python):
import bisect,collections,copy,heapq,itertools,math,numpy,string
import sys
from decimal import Decimal
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())

N = I()
q,r = 0,0
A =[]
for i in range(15):
    if N < 26:
        r = N
        break
    q = N//26
    r = N%26
    if r == 0:
        q -= 1
        r = 26
    
    A.append(string.ascii_lowercase[r-1])
    
    N = q
if r > 0:
    A.append(string.ascii_lowercase[r-1])
print("".join(A[::-1]))

Solution (Python):

 

 
import sys
from fractions import gcd
import math
from math import ceil,floor
import collections
from collections import Counter
import itertools
 

 







 
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
y = 26
idx = []

c = [chr(i + ord("a")) for i in range(26)]

while True:
    idx.append(n % y)
    n //= y
    if n <= 0:
        break
    n -= 1

idx.reverse()
ans = []
for i in idx:
    ans.append(c[i])
print("".join(ans))

Solution (Python):





N = int(input())
ans = ''
while N:
    
    N -= 1

    
    alphabet = chr(ord('a') + N % 26)
    ans += alphabet
    N //= 26
    

print(ans[::-1])

Solution (Python):
kigou=list("abcdefghijklmnopqrstuvwxyz")
a=int(input())
keta=0
count=0
counter=[0]
for i in range(1,100):
    x=26**i+count
    if 26**i+count>=a:
      keta=i
      counter.append(x)
      break
    else:
        count+=26**i
        counter.append(count)
ans=""

for i in range(keta):
    a -= 1
    ans=kigou[a%26]+ans
    a=a//26

print(ans)

Solution (Python):
alp=[chr(i) for i in range(ord("a"),ord("z")+1)]
def main(n):
  ans=""
  while n:
    n-=1
    ans+=alp[n%26]
    n//=26
  return ans[::-1]
n=int(input())
print(main(n))

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

while True:
    if n < 26:
        x = chr(97+n) + x
        break
    quotient = n//26
    remainder = n%26
    x = chr(97+(remainder))  + x
    n = quotient-1
    
print(x)

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

ans = ""
N = int(input())
while N > 0:
    tmp = N % 26
    if tmp == 0:
        ans += chr(26+96)
        if N == 26:
            break
        N //= 26
        N -= 1
        
    else:    
        ans += chr(tmp+96)
        N //= 26

print(ans[::-1])

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

print(ans[::-1])

Solution (Python):
digits = "abcdefghijklmnopqrstuvwxyz"

n = int(input())
ans = []

while n:
    n -= 1
    m = n%26
    n = n//26
    ans.append(digits[m])

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

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

    i = 1
    sum = 0
    temp = 0
    while True:
        temp = 0
        i += 1
        sum += 1
        for j in range(1,i):
            temp += 26**j

        if N <= temp:
            break

    
    temp = 0
    for j in range(1,sum):
        temp += 26**j
    
    N -= (temp+1)
    

    ans = []
    for j in range(sum):
        amari = N%26
        N = N//26
        
        ans.append(amari)

    ans2 = [0]*len(ans)
    dict = {0:'a',1:'b',2:'c',3:'d',4:'e',5:'f',6:'g',7:'h',8:'i',9:'j',10:'k',11:'l',12:'m',13:'n',14:'o',15:'p',16:'q',17:'r',18:'s',19:'t',20:'u',21:'v',22:'w',23:'x',24:'y',25:'z'}
    for j in range(sum):
        ans2[sum-1-j] = dict[ans[j]]
    print(''.join(ans2))


main()

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

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

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

print(''.join(reversed(chars)))

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
input = sys.stdin.readline

def main():
    N = int(input())
    keta = 1
    ans = ""
    while 1:
        x = N % (26**keta) // (26**(keta-1))
        if x == 0:
            x = 26
        ans = chr(ord("a") + (x-1)) + ans
        N -= x * (26**(keta-1))
        keta += 1
        if N == 0:
            break
    print(ans)

if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
alf = [chr(i) for i in range(97, 97+26)]
List = []
for i in range(100):
  if N > 0:
    N -= 1
    a = N % 26
    N = N // 26
    List.append(alf[a])
  else:
    break
    

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

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

ans = []

while n > 0:
    if n%26 != 0:
        a = chr(n%26+96)
        ans.append(a)
        n = n//26
    else:
        ans.append('z')
        n = n//26-1

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

Solution (Python):
import sys 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
N = int(readline())
res = ''
while(N):
    N -= 1
    res += chr(ord('a') + N % 26)
    N //= 26
print(res[::-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):
def solve(n):
    string = []
    while n > 0:
        remainder = n % 26
        if remainder == 0:
            string.append('z')
            n = (n//26)-1
        else:
            a = chr((remainder-1)+ord('a'))
            string.append(a)
            n = n//26
    return ''.join(string[::-1])

if __name__ == '__main__':
    n = int(input())
    print(solve(n))

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

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

Solution (Python):
import math

n = (int)(input())


remain = []
while n > 0:
    re = n % 26
    if re == 0:
        re = 26
    remain.append(re)
    n = math.floor(n / 26)
    if re == 26:
        n -= 1
remain.reverse()


ret = ""
for i in remain:
    ret += chr(i + 96)

print("{}".format(ret))

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


def solve(x):
    if x == 0:
        return ""
    x -= 1
    return solve(x // 26) + chr(97 + x % 26)


print(solve(N))

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

Solution (Python):
n = int(input())
a = 0
r = 26
count = 1
result = ""
moji = ["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:
    if r < n:
        n -= r
        r *= 26
        count += 1
    else:
        a = 1
zenbu = 26**count

def kaidan(zenbu,n):
    global moji
    for i in range(26):
        
        if (zenbu/26)*i < n <= (zenbu/26)*(i+1):
            return(moji[i],i)

for l in range(count):
    kotae,s = kaidan(zenbu/(26**l),n)
    result += kotae
    n -= 26**(count-l-1)*s
print(result)

Solution (Python):
def encode(x):
    return chr(x + 97)


def solve(N):
    ans = []
    while True:
        N -= 1
        q, r = divmod(N, 26)
        ans.append(r)
        if q == 0:
            break
        N //= 26
    return "".join(map(encode, ans[::-1]))


print(solve(int(input())))

Solution (Python):
def encode(x):
    return chr(x + 97)


def solve(N):
    N -= 1
    ans = []
    while True:
        q, r = divmod(N, 26)
        ans.append(r)
        if q == 0:
            break
        N //= 26
        N -= 1
    return "".join(map(encode, ans[::-1]))


print(solve(int(input())))

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())
chars="-abcdefghijklmnopqrstuvwxyz"

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):
N = int(input())
out = []
def Saiki(N):
  w = N // 26
  z = N % 26
  ca = 1
  if(z == 0):
    w -= 1
    z = 26
  ca += z - 1
  out.insert(0, chr(ca + 96))
  if(w == 0): return
  Saiki(w)
Saiki(N)
print(''.join(out))

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

ls =[]

while N > 0:
  N -= 1
  a = (N%26)
  ls.append(al[a])
  N = N // 26

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

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

    orda = ord('a')
    ans = ''
    
    while N:
        N -= 1
        N, Nmod = divmod(N, 26)
        ans = chr(orda + Nmod) + ans

    print(ans)


if __name__ == '__main__':
	main()

exit()

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 9)

asc2en = lambda x: chr(x + 97)
N = int(input())


def rec(N):
    if (N - 1) // 26:
        return rec((N - 1) // 26) + asc2en((N - 1) % 26)
    return asc2en((N - 1) % 26)


print(rec(N))

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

    aord = ord('a')
    ans = ''
    
    while N:
        N, Nmod = divmod(N, 26)
        if Nmod:
            ans = chr(aord + Nmod - 1) + ans
        else:
            ans = chr(aord + 25) + ans
            N -= 1

    print(ans)


if __name__ == '__main__':
	main()

exit()

Solution (Python):


N = int(input())
M = 26
digit = 0
N -= 1

for d in range(1, 12):
    if N < M ** d:
        digit = d - 1
        break
    N -= M ** d

name = ""

for i in range(digit + 1):
    name += chr(ord("a") + (N % M))
    N //= M

print(name[::-1])

Solution (Python):
from sys import stdin
from sys import setrecursionlimit
from string import ascii_lowercase
from collections import Counter, deque, defaultdict
from math import floor, ceil
from bisect import bisect_left
from itertools import combinations, product
setrecursionlimit(100000)

INF = int(1e10)
MOD = int(1e9 + 7)

chs = ascii_lowercase


def main():
    from builtins import int, map

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

if __name__ == '__main__':
    main()

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

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

print(f[::-1])

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

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

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


if __name__ == "__main__":
    main()

Solution (Python):

n = int(input())
t = []
while n > 0:
    n -= 1
    t.append(chr(n % 26 + ord("a")))
    n //= 26
print("".join(t[::-1]))

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

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

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


while 1:
  N-=1
  l = N%26
  N = N//26
  ans+=alf[l]
  if N==0:
    break
print(ans[::-1])

Solution (Python):
num=[26**i for i in range(12)]
n=int(input())
s_num=[]
sss=0
e=0
for i in num:
    sss+=i
    if sss>n:
        break
    s_num.append(sss)
num=num[:len(s_num)][::-1]
n-=s_num[-1]

xxx=[]
ans=""
for i in num:
    x=n//i
    n-=x*i
    xxx.append(x+1)
    ans+=chr(ord('a')+x)
  

print(ans)

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

Solution (Python):
N = int(input())
temp = 'abcdefghijklmnopqrstuvwxyz'
t = 26
k = 1
while N > t:
    k += 1
    N -= t
    t *= 26
    
M = []
N -= 1
for n in range(k-1, -1, -1):
    d = N // (26 ** n)
    M.append(d)
    N -= (26 ** n) * d

print(''.join([temp[v]  for v in M]))

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

Solution (Python):
def main():

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

    ans = ans[::-1] 
    print(f'{ans}')


if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
alpha = list('abcdefghijklmnopqrstuvwxyz')
ans = ""
while N>0:
    N -= 1
    d = N%26
    ans += alpha[d]
    N //= 26
ans = list(reversed(ans))
ans = "".join(ans)
print(ans)

Solution (Python):
import sys


def log(s):
    
    pass


def output(x):
    print(x, flush=True)


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


def f(n, b, d):
    digits = []
    for _ in range(d):
        digits.append(n % b)
        n //= b
    return reversed(digits)


def main():
    n = int(input()) - 1

    b = 0
    i = 1
    while n >= b + 26**i:
        b += 26**i
        i += 1

    print("".join([chr(k+97) for k in f(n - b, 26, i)]))


main()

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

n = int(input())
s = []
while n:
    n -= 1
    s.append(chr(n % 26 + ord('a')))
    n //= 26
print(''.join(s[::-1]))

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

print(ans[::-1])

Solution (Python):
n = int(input())
x = 0
l = 0
while x < n:
    l += 1
    x += 26**l
for i in range(1,l):
    n -= 26**i
n -= 1
ans = ""
while len(ans) < l:
    ans += chr(ord("a")+n%26)
    n //= 26
print(ans[::-1])

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

    chars = 'zabcdefghijklmnopqrstuvwxy'

    st = ''
    while True:
        a = n % 26
        st += chars[a]
        n = n // 26
        if n == 0 or (a == 0 and n == 1):
            break
        elif a == 0:
            n -= 1


    res = ''.join(list(reversed(st)))
    print(res)


main()

Solution (Python):
N = int(input())
Min = 1
Max = 26
Count = 0
Flag = True
while Flag:
    Count += 1
    if Min<=N<=Max:
        Disp = ['']*Count
        Flag = False
        Num = N-Min
        for T in range(1,Count+1):
            Disp[-T] = chr(97+Num%26)
            Num = Num//26
    else:
        Min = Max+1
        Max += pow(26,Count+1)
print(''.join(Disp))

Solution (Python):
alphabets = "abcdefghijklmnopqrstuvwxyz"


n = int(input())

A = []
while True:
    A.append(n % 26)
    n //= 26
    if n == 0:
        break

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

ANS = []
for a in A[::-1]:
    if a == 0:
        continue
    ANS.append(alphabets[a - 1])

print("".join(ANS))

Solution (Python):



N = int(input())

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


def main():
    x = N
    ans = ""
    while x > 0:
        x -= 1
        ans += alpha[x % 26]
        x //= 26
    print(ans[::-1])
        

if __name__ == "__main__":
    main()

Solution (Python):
n=int(input())
N=n
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"]
t=1
for i in range(1,20):
    if n>26**i:
        n=n-26**i
        t+=1
p=[0]*t
s=0
A=""
for i in range(1,t+1):
    s=N%26
    if s == 0:
        s = 26
    N=(N-s)//26
    p[t-i]=s
for i in range(t):
    A+=(a[p[i]-1])
print(A)