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

import numpy as np
from collections import deque
from collections import defaultdict
import heapq
import collections
import itertools
import bisect


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


def z():
    return int(input())


def S():
    return input()


def C(line):
    return [input() for _ in range(line)]


N = z()


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)


ans = num2alpha(N)
print(ans.lower())

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

cum = 0
d = 1
for i in range(1, 100):
  if cum + 26**i>=n:
    
    break
  cum += 26**i
  d += 1

rest = n - cum - 1
ans = [0]*d
for i in range(d-1, -1, -1):
  ans[i] = rest//(26**i)
  rest = rest%(26**i)
  
ans = ans[::-1]


alp = 'abcdefghijklmnopqrstuvwxyz'
mapp = {i:alp[i] for i in range(26)}
for i in range(d):
  ans[i] = mapp[ans[i]]
  
print(''.join(ans))

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

Solution (Python):

N = int(input())
ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'

ans = ""
while(N > 0):
    N, mod = divmod(N, 26)
    if mod == 0:
        N -= 1
        ans = "z" + ans
    else:
        ans = ascii_lowercase[mod - 1] + ans

print(ans)

Solution (Python):


import sys
input=sys.stdin.readline

def main():
    N=int(input())-1
    st=[]
    n=26
    for i in range(1,1000000):
        st.append(chr(N%n+ord("a")))
        N=int(N//n)
        if N==0:
            break
        N-=1
    st=st[::-1]
    print("".join(st))
    
    
    
if __name__=="__main__":
    main()

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

i = 1
ans = []
while n > 0:
   v = (n % (26 ** i)) // (26 ** (i-1))
   if v == 0:
      ans.append('z')
      n -= (26 ** i)
      i += 1
   else:
      ans.append(chr(ord('a') + v - 1))
      n -= n % (26 ** i)
      i += 1
print("".join(reversed(ans)))

Solution (Python):
N = int(input())
alpha = "zabcdefghijklmnopqrstuvwxy"
ans = ""
while N > 0:
    ans = alpha[N%26] + ans
    if N%26==0:
        N = (N-26) //26
    else:
        N = N // 26
print(ans)

Solution (Python):
N=int(input())
s=""
while N>0:
    x=N%26
    if x==0:
        x=26
        N=N//26-1
    else:
        N=N//26
    s=chr(96+x)+s
print(s)

Solution (Python):
N=int(input())
ta=[]
t=N
while t>0:
    t,m=divmod(t,26)
    if m==0:
        t-=1
    ta.append(m)
l='abcdefghijklmnopqrstuvwxyz'
ta=ta[::-1]
ans=''
for i in ta:
    ans+=l[i-1]
print(ans)

Solution (Python):


import sys
sys.setrecursionlimit(300000)


def solve(N: int):
    ret = []
    while N > 0:
        tmp = N % 26
        if tmp > 0:
            ret.append(chr(ord('a') + tmp - 1))
        else:
            ret.append('z')
        N = (N - 1) // 26
    ret.reverse()
    ret = ''.join(ret)
    print(ret)
    return

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    solve(N)

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)
      
if __name__ == '__main__':
  N = int(input())
  ans = num2alpha(N)
  print(ans.lower())

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

L = 1
R = 26
R0 = 0

while N > R:
    R0 = R
    L += 1
    R += 26**L

N2 = N - R0 - 1
S = []

for _ in range(L):
    N2,d = divmod(N2, 26)
    S.append(chr(d + 97))

print(''.join(reversed(S)))

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


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):
import string
N = int(input())
tmp = 0
for digit in range(1, 100):
    tmp += 26**digit
    if tmp >= N:
        break
N -= sum(26**i for i in range(1, digit)) + 1
ans = []
while N:
    ans += [N % 26]
    N //= 26
ans += [0] * (digit - len(ans))
ans = ans[::-1]
print(''.join(string.ascii_lowercase[i] for i in 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)

ans = num2alpha(N)
ans=ans.lower()
print(ans)

Solution (Python):
N = int(input())
ans = []

while True:
  if N%26 == 0:
    ans.append('z')
  else:
    ans.append(chr(N%26+96))
  N = (N-1)//26
  if N == 0:
    break
ans.reverse()
print(''.join(ans))

Solution (Python):
n = int(input())
x = 26
i = 1
ans = []
while n != 0:
    ans.append(chr(ord("a") + (n - 1) % x))
    n = (n - 1) // x

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

Solution (Python):
def num2abc(num):
    if num<=26:
        return chr(64+num)
    elif num%26==0:
        return num2abc(num//26-1)+chr(90)
    else:
        return num2abc(num//26)+chr(64+num%26)

print(num2abc(int(input())).lower())

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

N = int(input())
char = ['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:
    i = N%26
    ans.append(char[i-1])
    N = (N-1)//26
print(''.join(ans[::-1]))

Solution (Python):
import sys,queue,math,copy,itertools,bisect,collections,heapq

def main():
    sys.setrecursionlimit(10**7)
    INF = 10**18
    MOD = 10**9 + 7
    LI = lambda : [int(x) for x in sys.stdin.readline().split()]
    _LI = lambda : [-int(x) for x in sys.stdin.readline().split()]
    NI = lambda : int(sys.stdin.readline())
    SI = lambda : sys.stdin.readline().rstrip()
    DD = ((1,0),(0,1),(-1,0),(0,-1))

    N = NI()

    ans = ''
    while N > 0:



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


    print(ans)
if __name__ == '__main__':
    main()

Solution (Python):
import math,itertools,fractions,heapq,collections,bisect,sys,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
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 [int(x) for x in sys.stdin.readline().split()]

def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()


alf=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']


def main():
  n=I()
  ans=''
  while True:
    if n<=0:
      break
    x=n%26
    n-=1
    n//=26
    ans+=alf[x-1]
    

  ans=list(ans)
  ans.reverse()
  return ''.join(ans)


print(main())

Solution (Python):
n = int(input())
import string
alphabets = string.ascii_letters 
characters = alphabets[:26]
def base_cvt(value, n=26):
    tmp = int(value)
 
    result = ''
    tmp = int(value)
    while tmp >= n:
        idx = tmp%n
        result = characters[idx] + result
        tmp = int(tmp / n) -1
    idx = tmp%n
    result = characters[idx] + result
    return result
print(base_cvt(value= n -1))

Solution (Python):
n = int(input())
name = ""
dig_num = 0
sum_num = 0
pow26 = {0: 1}
while n > sum_num:
    dig_num += 1
    pow26[dig_num] = 26**dig_num
    sum_num += pow26[dig_num]

i = dig_num-1
while i >= 1:
    n -= pow26[i]
    i -= 1

for i in range(dig_num):
    now_dig = ((n-1)//pow26[i])%26
    name = chr(ord("a")+now_dig) + name

print(name)

Solution (Python):
from math import gcd

from math import factorial as f

from math import ceil,floor,sqrt
import math

import bisect
import re
import heapq


from copy import deepcopy
import itertools
from itertools import permutations

from sys import exit

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))


yes = "Yes"
no = "No"


def main():
    l = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
    n = ii()
    tmp = 26
    cnt = 1
    while n > tmp:
        n-=tmp
        tmp*=26
        cnt+=1
    cnt-=1
    tmplist = []
    while cnt > 0:
        tmptmp = 26**cnt

        if n%tmptmp == 0:
            tmplist.append(n//tmptmp-1)

        else:
            tmplist.append(n//tmptmp)
        n%=tmptmp
        cnt-=1
    if n%26 == 0:
        tmplist.append(25)
    else:
        tmplist.append(n-1)

    ans = ''
    for i in tmplist:
        ans+=l[i]

    print(ans)



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 solve(N):
    s=0
    length=1
    tmp=26
    while(s<=N):
        if s+tmp>=N:
            break
        length+=1
        s+=tmp
        tmp*=26
    X=[0 for i in range(length)]
    A=N-s-1
    k=0
    while(A>0):
        X[k]=A%26
        A//=26
        k+=1
    
    ans=""
    for i in X:
        ans=chr(i+97)+ans
    return ans
print(solve(int(input())))

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

ans=num2alpha(N)

print(ans)

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

Solution (Python):
def main():
    N = int(input())
    a = []
    itoa = 'abcdefghijklmnopqrstuvwxyz'
    while True:
        b = (N-1) % 26
        a.append(itoa[b])
        N = (N-1) // 26
        if N == 0:
            break
    print(''.join(reversed(a)))

if __name__ == '__main__':
    main()

Solution (Python):
import string

small = string.ascii_lowercase
n = int(input())

ans = ""
while n > 0:
    n -= 1
    r = n % 26
    ans = small[r] + ans
    n  = (n- r) // 26
print(ans)

Solution (Python):
n = int(input())
alpha = "abcdefghijklmnopqrstuvwxyz"
count = 1
while True:
    if 26 ** count >= n:
        break
    else:
        n -= 26 ** count
        count += 1
n -= 1
num = []
for i in range(count):
    num.append(n % 26)
    n //= 26
num.reverse()
name = ""
for i in num:
    name += alpha[i]
print(name)

Solution (Python):

from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations, accumulate
import sys
import math
import bisect


def LI(): return [int(x) for x in sys.stdin.readline().split()]


def I(): return int(sys.stdin.readline())


def LS(): return [list(x) for x in sys.stdin.readline().split()]


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


def IR(n):
    return [I() for i in range(n)]


def LIR(n):
    return [LI() for i in range(n)]


def SR(n):
    return [S() for i in range(n)]


def LSR(n):
    return [LS() for i in range(n)]


sys.setrecursionlimit(1000000)


def main():
    tmp = ""
    N = I()
    while N != 0:
        amari = (N % 26 - 1) % 26
        N = (N - 1) // 26
        tmp = chr(ord("a") + amari) + tmp

    print(tmp)


main()

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


v = []
while True:
    N, mod = divmod(N, 26)
    if mod == 0:
        mod = 26
        N -= 1
    v.append(mod)
    if N < 26:
        v.append(N)
        break
v = v[::-1]

alphabets = list('0abcdefghijklmnopqrstuvwxyz')
s = []
for i in v:
    if i == 0:
        continue
    s.append(alphabets[i])

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

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

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

while True:
    ans.append(alpha[n%26-1])
    if n//26==0:
        break
    elif n==26:
        break
    else:
        n/=26
        n=math.ceil(n-1)

print("".join(reversed(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)
S=num2alpha(N)
s=S.lower()
print(s)

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)

A = num2alpha(N)
print(A.lower())

Solution (Python):

import sys
input = sys.stdin.readline
ipnl = lambda n: [int(input()) for _ in range(n)]
inp = lambda :int(input())
ip = lambda :[int(w) for w in input().split()]

import string
al = list(string.ascii_lowercase)
n = inp()
ans = ""
while n:
    n -= 1
    rem = n%26
    ans = al[rem] + ans
    n = (n-rem)//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())

S = 'zabcdefghijklmnopqrstuvwxy'
l = []
while N > 0:
    k = N % 26
    l.append(S[k])
    N //= 26
    if k == 0:
       N -= 1
l.reverse()
print(''.join(l))

Solution (Python):
import sys, math
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mod = 10**9 + 7

N = ri()

n = 26
i = 1
while N-n > 0:
	N -= n
	n *= 26
	i += 1
N -= 1

ans = []
for i in range(i):
	r = N % 26
	ans.append(r)
	N = N // 26

name = ''
for i in reversed(ans):
	name += chr(ord('a')+i)
print(name)

Solution (Python):
import sys
import time




import math
start=time.time()
input = sys.stdin.readline
sys.setrecursionlimit(10**8)
inf = 10**18
MOD = 1000000007
ri = lambda : int(input())
rs = lambda : input().strip()
rl = lambda : list(map(int, input().split()))
n=ri()

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

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

print(num2alpha(N).lower())

Solution (Python):

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


import numpy as np

n = int(input())

x = num2alpha(n).lower()
print (x)

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):
import sys
input=lambda :sys.stdin.readline().rstrip()

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())
print(num2alpha(n))

Solution (Python):
from collections import deque

def main():
    N = int(input())
    l = deque()
    mozi = list("abcdefghijklmnopqrstuvwxyz")
    a, b = divmod(N, 26)
    N -= 1

    while True:
        a, b = divmod(N, 26)
        l.appendleft(mozi[b])
        N = a
        N -= 1
        if a == 0:
            break

    print("".join(l))


main()

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

Solution (Python):

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

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

Solution (Python):

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

Solution (Python):
from math import *

N = int(input())
name = ""


size = 0
while 26**size <= N:
    N -= 26**size
    size += 1

for pos in range(size):
    rem = N % 26
    name = chr(ord('a') + rem) + name
    N //= 26

print(name)

Solution (Python):
import string

N = int(input()) - 1
ss = string.ascii_lowercase

ans = ""

while N >= 0:
  ans += ss[N % 26]
  N = N // 26 - 1
  if N < 0:
    break

print(ans[::-1])

Solution (Python):
import string 
def convertbase26(N):
    n=26
    X=N-1
    if (int(X//n)):
        return convertbase26(int(X//n))+string.ascii_lowercase[X%n]
    return string.ascii_lowercase[X%n]


N=int(input())
rank=1
base=0
"""
while(1):
    base=26**(rank)+1
    if base>N:
        break
    N-=26**(rank-1)
"""
print( convertbase26(N) )

Solution (Python):

N = int(input())


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

print(num2alpha(N).lower())

Solution (Python):
n = int(input())
ans = ""
while n:
    n -= 1
    q, r = divmod(n, 26)
    ans += chr(ord("a")+r)
    n = q
print(ans[::-1])

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

name = []
while N:
    name.append(N%26)
    N = (N-1)//26

name = name[::-1]
ans = "".join(map(lambda x : chr(x+96), name))
ans = ans.replace('`','z')
print(ans)

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

ans = ''
while True:
    amari = N % 26
    N = N//26

    if amari == 0:
        ans = 'z'+ans
        N -= 1
    else:
        ans = chr(96+amari)+ans

    if N == 0:
        break

print(ans)

Solution (Python):
N = int(input())
N = N
s = "zabcdefghijklmnopqrstuvwxyz"
ans = []
while True:
    temp = N % 26
    ans.append(s[temp])
    if temp == 0:
        N = N - 1
    N = N // 26
    if N <= 0:
        break

ans.reverse()
print("".join(ans))

Solution (Python):
n = int(input())
lis = []
while n != 0:
    if n%26 == 0:
        lis.append(int(0))
        n -= 26
        n /= 26
    else:
        lis.append(int(n%26))
        n -= n%26
        n /= 26
alp = ["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"]
st = ""
for i in range(len(lis),0,-1):
    st += alp[lis[i-1]]
print(st)

Solution (Python):
n = int(input())
l = []
while(n > 0):
  n -= 1
  l.append(chr(97+(n%26)))
  n = n//26
for i in l[::-1]:
    print(i,end="")
print("")

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)

if __name__ == "__main__":
    N = int(input())
    N = num2alpha(int(N)).lower()
    print(N)

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

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

a = num2alpha(N)
print(a.lower())

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

s = ''
while (n > 0):
    r = n % 26

    if r == 0:
        s = 'z' + s
        n = (n - 26) // 26
    else:
        c = chr((r - 1) + ord('a'))
        s = c + s
        n //= 26

print(s)

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

for a in range(11,-1,-1):
  if n > (26*pow(26,a)-26)/(26-1):
    break
n -= (26*pow(26,a)-26)/(26-1)+1
n = int(n)
a += 1



ans = []
for i in range(a):
  s = n%26
  ans.append(chr(97+s))
  n //= 26
print(''.join(ans[::-1]))

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

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

print(num2alpha(N).lower())

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

ans=''
alp=list('abcdefghijklmnopqrstuvwxyz')

while N != 0:
  N,mod=divmod(N-1,26)
  ans=alp[mod]+ans
print(ans)

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

ans = ""

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

print(ans)

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


n -= 1
char = ['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 = ""
f = 0
while True:
    s = s + char[n % 26]
    n = n // 26 - 1

    if n <= -1:
        break
print(s[::-1])

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

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

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)

print(num2alpha(int(input())).lower())

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):
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
from itertools import permutations, accumulate, combinations, combinations_with_replacement
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right, insort_left, insort_right
from copy import deepcopy
from operator import itemgetter
from functools import reduce, lru_cache  
from fractions import gcd
import sys  

A = [26**i for i in range(1, 13)]
Acc = list(accumulate(A))
n = int(input())
l = bisect_left(Acc, n)


ANS = []
for i in range(l+1):
    tmp = n % 26 if n % 26 != 0 else 26
    ANS.append(chr(ord("a")-1+tmp))
    n -= tmp
    n //= 26
ANS.reverse()
print("".join(ANS))

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

name = list()
while N >= 1:
    num_name = N % 26
    if num_name == 0:
        name.append("z")
    else:
        name.append(chr(ord("a") + num_name - 1))
    N //= 26
    if num_name == 0:
        N -= 1

for i in range(len(name)-1, -1, -1):
    print(name[i], end = "")

Solution (Python):
alphabets=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
n=int(input())
current=0
length=0
while current<n:
  current+=26**(length+1)
  length+=1
current-=26**(length)
n-=current+1
ans=[]
for i in range(length):
  ans.append(alphabets[((n%(26**(i+1)))-n%(26**i))//(26**i)])
ans.reverse()
print(''.join(ans))

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

def alphabet_decimal(v):
    quotient = math.floor(v / len(ALPHABET))
    surplus = v % len(ALPHABET)
    quotient -= 1 if surplus == 0 else 0
    surplus = len(ALPHABET) if surplus == 0 else surplus
    result.append(surplus)
    if len(ALPHABET) < quotient:
        alphabet_decimal(quotient)
    elif len(ALPHABET) < v:
        result.append(quotient)
    return "".join([ALPHABET[i - 1] for i in reversed(result)])

n = int(input())

print(alphabet_decimal(n))

Solution (Python):
import heapq

n = int(input())

s = []
while (n != 0):

    if(n == 26):
        s.append("z")
        break

    temp = n % 26
    if(temp == 0):
        temp = 26
    s.append(chr(temp + 96))
    n = (n - temp) // 26

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

Solution (Python):
n = int(input())
lst = []
while n:
  mod = n % 26
  if mod:
    lst += [chr(96 + mod)]
    n = n // 26
  else:
    lst += ['z']
    n = (n - 26) // 26
lst.reverse()
print(''.join(lst))

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

N = int(input())
Alpha = toString(N)
alpha = Alpha.lower()
print(alpha)

Solution (Python):
from math import *

n=int(input())
ans=[]
while n>0:
	x=n%26
	if x==0:
		x=26
		n-=1
	ans.append(x)
	n=n//26

ans.reverse()
f=''
for i in ans:
	f=f+chr(96+i)

print(f)

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


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):
FAST_IO = 1
if FAST_IO:
    import io, sys, atexit
    rr = iter(sys.stdin.read().splitlines()).next
    sys.stdout = _OUTPUT_BUFFER = io.BytesIO()
    @atexit.register
    def write():
        sys.__stdout__.write(_OUTPUT_BUFFER.getvalue())
else:
    rr = raw_input
rri = lambda: int(rr())
rrm = lambda: map(int, rr().split())
 
    
    
def solve(N):
    arr = [chr(ord('a')+i) for i in range(26)]
    num_digit = 1
    tmp = N
    while tmp-26**num_digit>=0:
        tmp -=26**num_digit
        num_digit+=1
    ans = ''
    while num_digit:
        idx = tmp // 26**(num_digit-1)
        tmp = tmp % 26**(num_digit-1)
        ans+= arr[idx]
        num_digit-=1
    print(ans)
N = rri()
solve(N-1)

Solution (Python):
def aa(num):
    if num <= 26:
        return chr(96+num)
    elif num % 26 == 0:
        return aa(num//26-1)+chr(122)
    else:
        return aa(num//26)+chr(96+num%26)


n =int(input())
x = aa(n)
print(x)

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

x = 1
for d in range(1, 15):
  x *= 26
  if N <= x:
    break
  else:
    N -= x
    

N -= 1
ans = ''
for i in range(d):
  r = N % 26
  ans = chr(ord('a') + r) + ans
  N //= 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)

ans=num2alpha(N)
print(ans.lower())

Solution (Python):
from string import ascii_lowercase


def main():
    n = int(input())
    answer = []
    while n > 0:
        answer.append(ascii_lowercase[n % 26 - 1])
        if n % 26:
            n //= 26
        else:
            n = (n - 1) // 26
    print("".join(answer[::-1]))


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())
a = num2alpha(N)
print(a.lower())

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

ans=""

alp="abcdefghijklmnopqrstuvwxyz"

def f(n):
	global ans
	ans=alp[n%26]+ans
	if n>=26: f(n//26-1)
	return(ans)


print(f(N))