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 string

N = int(input())
char_list = string.ascii_lowercase
char_list = char_list[:-1]
char_list = 'z' + char_list

tmp = 0
count = 0
ans = ''
while 1:
    before = tmp
    count += 1
    tmp += 26**count
    if before < N <= tmp:
        tmp = N
        while 1:
             ans = char_list[tmp%26] + ans
             tmp = (tmp-1) // 26
             count -= 1
             if count == 0:
                 break
        break
    else:
        pass

print(ans)

Solution (Python):
def alpha(n):
    if n <= 26:
        return chr(ord('a')-1+n)
    elif n % 26 == 0:
        return alpha(n//26-1)+'z'
    else:
        return alpha(n//26)+chr(ord('a')-1+(n % 26))

n = int(input())
print(alpha(n))

Solution (Python):
alp = [chr(i) for i in range(97, 97+26)]
N = int(input())
q = N
s = ""
while True:
  q,m = divmod(q,26)
  if m == 0:
    m = 26
    q -= 1
  s = alp[m - 1] + s
  if q == 0:
    break
print(s)

Solution (Python):
def convert(n):
    r, i = "", 0
    while True:
        n, m = divmod(n, 26)
        if m == 0:
            n, m = n-1, 26
        r += chr(ord('`') + m)
        if n == 0:
            break
    return r[::-1]
print(convert(int(input())))

Solution (Python):
def main():
    n = int(input())
    ans = []
    while n>25:
        p = n//26
        k = n-26*p
        if k==0:
            ans.append(26)
            n = p-1
        else:
            ans.append(k)
            n = p
    if n!=0:
        ans.append(n)
    ans = ans[::-1]
    b = []
    for i in range(len(ans)):
        b.append(chr(96+ans[i]))

    print(''.join(b))

if __name__ == "__main__":
    main()

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

count = 1
c = 1

while c == 1:
    if n <= (26 ** count):
        c = 0
    else:
        n = n - 26 ** count
    count += 1

count -= 1
n -= 1

s = [0 for i in range(count)]


for i in range(count):
    s[i] = n % 26
    n = n // 26


result = ""
for i in range(count):
    result = chr(97 + s[i]) + result

print(result)

Solution (Python):
n = int(input())
alp = "abcdefghijklmnopqrstuvwxyz"
d = {i+1:s for i, s in enumerate(alp)}
s = ""
while True:
    q, mod = divmod(n, 26)
    if mod == 0:
        s = "z" + s
        n = q-1
    else:
        s = d[mod] + s
        n = q
    if n == 0:
        break
print(s)

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

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

print(num2alpha(N))

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

keta = 1
now_26 = 26
while N > now_26:
  keta += 1
  now_26 += 26 ** keta

num = N - int(now_26 - 26 ** keta) -1

answer = ""
for i in range(keta):
  answer += chr(97 + num % 26)
  num = num // 26

print(answer[::-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)
num = int(input())
answer = num2alpha(num)
print(answer.lower())

Solution (Python):
n=int(input())
l = []
s='abcdefghijklmnopqrstuvwxyz'
while n > 0:
    l.append((n-1)%26)
    n = (n -1)// 26
ans = ''
for i in l[::-1]:
    ans += s[i]
print(ans)

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

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


k=0
while N>=0:
    N -= 26**k
    k += 1

A = []
k -= 1
len_k = k
while k >= 0:
    A.append(N//(26**k))
    N %= (26**k)
    k -= 1

res = []
for i in A[-len_k:]:
    res.append(alpha[i])

print("".join(res))

Solution (Python):




import numpy as np
from collections import deque


def int_mtx(N):
    x = []
    for _ in range(N):
        x.append(list(map(int,input().split())))
    return np.array(x)

N = int(input())

nowN = 26
start = 1
order = 1

for i in range(1,1000):
    if N <= nowN:
        break
    order += 1
    start = nowN+1
    nowN = nowN + 26**(i+1)

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

for i in range(0,order):
    for j in range(1,27):
        if N <= start-1 + j*26**(order-i-1):
            start = start + (j-1)*26**(order-i-1)
            ans.append(item[j-1])
            break


print("".join(ans))

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



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

resid = []

while(True):
    q, mod = divmod(N - 1, 26)

    resid.append(mod)

    if(q == 0):
        break

    N = q



for i in range(len(resid)):
    e = resid.pop()

    print(alphabet[e], end = "")

print("")

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


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



print(''.join(map(lambda x: chr(ord('a')+x-1), 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):
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):
import sys
import heapq
import math
import fractions
import bisect
import itertools
from collections import Counter
from collections import deque
from operator import itemgetter
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

l= "abcdefghijklmnopqrstuvwxyz"
n=int(input())
a=[1,26]
b=[1,26]
ans=[]
if n==1:
    print("a")
    exit()
for i in range(13):
    a.append(a[-1]*26)
    b.append(b[-1]+a[-1])
for i in range(15):
    if n<=b[i]:
        c=i
        m=n-b[i]-1
        break
for i in range(c,0,-1):
    m,ind=divmod(m,26)
    ans.append(l[ind])
ans=reversed(ans)
print(*ans,sep="")

Solution (Python):
import math as mt
import collections as cc
I=lambda:list(map(int,input().split()))
ans=[]
prev=0
for i in range(1,15):
    ans.append(26**i+prev)
    prev+=26**i
    
n,=I()
p=0
s='abcdefghijklmnopqrstuvwxyz'
f={}
for i in range(1,27):
    f[i]=s[i-1]
for i in range(len(ans)):
    p+=1
    if n<=ans[i]:
        break
an=''
f[0]='z'
for i in range(p):

    an+=f[n%26]
    if n%26:
        n//=26
    else:
        n//=26
        n-=1
    
print(an[::-1])

Solution (Python):
n = int(input())
l = [26 ** j for j in range(1, 15)]
for i in range(15):
  if n <= sum(l[:i]):
    x = i 
    if i == 1:
      y = n - 1 
    else:
      y = n - sum(l[:i-1]) - 1 
    break
  else:
    pass
'''
m = []
for i in range(x):
  z = n % 26
  m.insert(0, z+96)
  n = n // 26

for i in range(len(m)):
  m[i] = chr(m[i])

print(''.join(m))
'''
m = []
for i in range(x):
  z = y % 26
  m.insert(0, z+97)
  y = y // 26
for i in range(len(m)):
  m[i] = chr(m[i])

print(''.join(m))

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

if __name__ == "__main__":
    N = int(input())
    solve()

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

max_num=1000000000000001
cnt=0
i=1
while True:
    next_cnt=cnt+26**i
    if n<=next_cnt:
        break
    i+=1
    cnt=next_cnt
index=n-cnt
ans=""
for j in range(i):
    k=0
    while True:
        if (26**(i-j-1))*k+1<=index<=(26**(i-j-1))*(k+1):
            ans+=chr(k+97)
            index-=(26**(i-j-1))*k
            
            break
        k+=1

print(ans)

Solution (Python):
Nmax = 1000000000000001
c = "abcdefghijklmnopqrstuvwxyz"

a = ""
N = int(input())
N = N-1
mm = 26
if N == 0:
  print("a")
  exit(0)

while N > 0:
  if N < mm:
    break
  N -= mm
  mm *= 26


while mm >= 26:
  mm = mm //26
  m = N // mm
  N = N % mm
  a = a + c[m]

print(a)

Solution (Python):
from math import log
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"]
N = int(input())
if N == 1: print("a")
elif N == 2: print("b")
else:
    N -= 1
    shou = N
    for i in range(N):
        if 26 * (26 ** i - 1) // 25 > N:
            shou -= 26 * (26 ** (i - 1) - 1) // 25
            break
    ans = ["a"] * i
    flag = 0
    
    while shou > 0:
        ans[flag] = alphabet[shou % 26]
        shou //= 26
        flag += 1
        
    ans.reverse()
    for i in ans: print(i,end = "")
    print()

Solution (Python):
N = int(input())
name = []
alphabet = [chr(i) for i in range(97, 97+26)]

while 0 < N:
    num = N // 26
    mod = N % 26
    if 26 < num:
        if mod == 0:
            name += alphabet[-1]
            num -= 1
        else:
            name += alphabet[mod-1]
    else:
        if mod == 0:
            name += alphabet[-1]
            num -= 1
        else:
            name += alphabet[mod-1]
    N = num

name.reverse()
print(*name, sep='')

Solution (Python):
n = int(input())
amari = 0
name = []
a = "abcdefghijklmnopqrstuvwxyz"

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

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

Solution (Python):
n=int(input())
k=n
keta=1
x=26
while k>x:
    k-=x
    keta+=1
    x*=26

book=['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']
l=[]

for i in reversed(range(1,keta)):
    s=(k-1)//(26**i)
    k-=s*(26**i)
    l.append(book[s])

l.append(book[k-1])
print("".join(l))

Solution (Python):
import sys
input = sys.stdin.readline
import string
import sys
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)])
def main():
    N = int(input())
    ans = alphabet_decimal(N).lower()
    print(ans)
if __name__ == "__main__":
    main()

Solution (Python):
from string import ascii_lowercase

n = int(input())
s = ascii_lowercase
ans =''
while True:
    x = n%26
    ans = s[x - 1] + ans
    n //= 26
    if x == 0:
        n -= 1
    if n == 0:
        break
print(''.join(ans))

Solution (Python):
n = int(input().strip()) 
s = chr((n - 1) % 26 + 97)
while n >= 27:
  n = (n - 1) // 26
  s = chr((n - 1) % 26 + 97) + s
print(s)

Solution (Python):
"""
~~ Author : Bhaskar
~~ Dated : 10~06~2020
"""

import sys
from bisect import *
from math import floor,sqrt,ceil,factorial as F,gcd,pi
from itertools import chain,combinations,permutations,accumulate
from collections import Counter,defaultdict,OrderedDict,deque
from array import array
INT_MAX = sys.maxsize
INT_MIN = -(sys.maxsize)-1
mod = 1000000007
ch = "abcdefghijklmnopqrstuvwxyz"
lcm = lambda a,b : (a*b)//gcd(a,b)
setbit = lambda x : bin(x)[2:].count("1")
input = lambda : sys.stdin.readline()

def solve():
    n = int(sys.stdin.readline())
    
    ans = ""
    while n:
        ans += ch[((n-1) % 26)]
        n = n - 1
        n //= 26
    print(ans[::-1])


if __name__ == "__main__":
    try:
        sys.stdin = open('input.txt','r')
        sys.stdout = open('output.txt','w')
    except:
       pass
    solve()

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

def get_name(N):

    alphabets = [chr(i) for i in range(97, 97+26)]
    length = len(alphabets)

    shou = (N - 1) // length
    amari = N % length

    if N <= 26:
        return alphabets[amari-1]
    else:
        return get_name(shou) + get_name(amari)

print(get_name(N))

Solution (Python):
def main(n):

    if (n <= 26):
        ans.append(chr(96 + n))
        ans.reverse()
        print(''.join(ans))
    elif( n % 26 == 0):
        ans.append(chr(122))
        main(n//26 - 1)
    else:
        ans.append(chr(96 + n%26))
        main(n//26)
        

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

main(n)

Solution (Python):
n=int(input())
k=n
keta=1
x=26
while k>x:
    k-=x
    keta+=1
    x*=26

book=['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']
l=[]

for i in reversed(range(1,keta)):
    s=(k-1)//(26**i)
    k-=s*(26**i)
    l.append(book[s])

l.append(book[k-1])
print("".join(l))

Solution (Python):
n=int(input())
al=[chr(ord('a') + i) for i in range(26)]
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 = sys.stdin.readline



def main():
    N = int(input().strip())
    ans = ""

    while N > 0:
        N, m = divmod(N, 26)
        if m == 0:
            N -= 1
            ans = chr(0x7A) + ans
        else:
            ans = chr(0x60 + m) + ans

    return ans


if __name__ == "__main__":
    print(main())

Solution (Python):
import sys
def rs(): return sys.stdin.readline().rstrip()
def ri(): return int(rs())
def rs_(): return [_ for _ in rs().split()]
def ri_(): return [int(_) for _ in rs().split()]

N = ri()
abc = 'abcdefghijklmnopqrstuvwxyz'
ans = ''
while N > 0:
    ans = abc[N % 26 - 1] + ans
    N = (N - ((N - 1) % 26) - 1) // 26
print(ans)

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

a=[]
for i in range(20):
    if N%26==0:
        s=26
        N=int(N/26)-1
    else:
        s=int(N%26)
        N=int(N/26)
    
    a.append(s)
    if N<1:
        break

a=a[::-1]
for i in range(len(a)):
    a[i]=chr(a[i]+96)

print("".join(a))

Solution (Python):
import numpy as np
import math
import collections
import bisect
import itertools


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)


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


if __name__ == "__main__":
    main()

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

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

print(str.lower(num10to26(N)))

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

name = []

def func(num):
    global name
    if num%26 == 0:
        name.insert(0, "z")
        if (num-26)//26 > 0:
            func((num-26)//26)
    else:
        name.insert(0, chr(96 + num%26))
        if num//26 > 0:
            func(num//26)

func(N)

print("".join(name))

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

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):
To_Acill = 96
 
N = int(input())
 
ans = []
 
jou26 = 1
while N > 0:
    tmp = N % (jou26*26)
    if tmp ==0:
        tmp =26*(jou26)
        ans.append(chr(To_Acill + 26))
    else:
        ans.append(chr(To_Acill + tmp//jou26))
    N = N-tmp
    jou26 = jou26*26
 
print("".join(reversed(ans)))

Solution (Python):
n = int(input())
alp = [chr(ord('a') + i) for i in range(26)]
res = []
x = 26
while n>0:
    n,r = divmod(n,x)
    if r==0:
        n -=1
    res.append(alp[r-1])
res = res[::-1]
print(*res,sep='')

Solution (Python):
n = int(input())
a = "abcdefghijklmnopqrstuvwxyz"
s = []
while n > 0:
    s.append(a[n%26 - 1])
    if (n % 26 == 0):
        n = n // 26 -1
    else:
        n //= 26
print(''.join(s[::-1]))

Solution (Python):
import sys
from math import factorial
from collections import Counter
from fractions import Fraction
import heapq, bisect, fractions
import math
import itertools
sys.setrecursionlimit(10 ** 5 + 10)
INF = 10**15 +5
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()))
MOD = 10**9 + 7


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

n = INT()

temp = 26
count = 0

while True:
    count += 1
    if n < temp:
        break
    n -= temp
    temp *= 26

n-= 1

ans = [0]*count
for i in range(count-1, -1, -1):
    kotae = n//(26**i)
    amari = n%(26**i)
    ans[i] = kotae
    n = amari

if ans[-1] == -1:
    ans = ans[:count-1]
for i in range(len(ans)-1, -1, -1):
    print(alp[ans[i]], end="")

Solution (Python):
c = ['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())
a = []
s = ""

while n > 26:
  r = n % 26
  if (r == 0):
    r = 26
    
  a.append(r)
  n -= r
  n = int(n/26)
  
a.append(n)
a.reverse()


for i in range(len(a)):
  s = s + c[a[i]-1]
  
print(s)

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

ans = ''
while n > 26:
    n, mod = divmod(n-1, 26)
    ans += chr(ord('a') + mod)


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

Solution (Python):
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))
def getArray(intn):
    return [int(input()) for i in range(intn)]
def input():
    return sys.stdin.readline().rstrip()
def rand_N(ran1, ran2):
    return random.randint(ran1, ran2)
def rand_List(ran1, ran2, rantime):
    return [random.randint(ran1, ran2) for i in range(rantime)]
def rand_ints_nodup(ran1, ran2, rantime):
  ns = []
  while len(ns) < rantime:
    n = random.randint(ran1, ran2)
    if not n in ns:
      ns.append(n)
  return sorted(ns)

def rand_query(ran1, ran2, rantime):
  r_query = []
  while len(r_query) < rantime:
    n_q = rand_ints_nodup(ran1, ran2, 2)
    if not n_q in r_query:
      r_query.append(n_q)
  return sorted(r_query)

from collections import defaultdict, deque, Counter
from sys import exit
from decimal import *
import heapq
import math
from fractions import gcd
import random
import string
import copy
from itertools import combinations, permutations, product
from operator import mul
from functools import reduce
from bisect import bisect_left, bisect_right

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






N = getN()

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):
def convertion(n):
    result = ""
    while n != 0:
        n -= 1
        m = n % 26
        n = n // 26
        result = chr(ord('a') + m) + result
    return result

n = int(input())
print(convertion(n))

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

while N > 26:
    if N%26 != 0:
        ans.append(alp[N%26-1])
        N = N // 26
    else:
        ans.append(alp[N%26-1])
        N = N // 26 -1
ans.append(alp[N-1])

for i in reversed(ans):
    print(i, end="")

Solution (Python):
n = int(input())
alpha = [chr(x) for x in range(ord('a'), ord('z')+1)]
name = ''
while n:
  n -= 1
  r = int(n%26)
  n = n // 26
  name += alpha[r]
print(name[::-1])

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline

n = int(input())
n-=1

ans = []

def Base_10_to_n(X, n, ans):
    if (int(X/n)):
        ans.append(chr(ord('a')+(X%n)))
        return Base_10_to_n(int(X/n)-1, n, ans)+str(X%n)
    ans.append(chr(ord('a')+(X%n)))
    return str(X%n)

num  = Base_10_to_n(n,26, ans)

ans.reverse()

print(*ans,sep='')

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

n = int(input())
amari = []
alpha = 'abcdefghijklmnopqrstuvwxyz'

while True:
    if (n-1) < 26:
        amari.insert(0, alpha[n-1])
        break
    else:
        ama = (n-1) % 26
        amari.insert(0, alpha[ama])
        n = (n -1)//26

print("".join(amari))

Solution (Python):
N = int(input())
A = [chr(ord('a') + i) for i in range(26)]
answer = ''
while N > 0:
    answer = A[N%26-1]+answer
    if N%26==0:
        N = N//26-1
    else:
        N = N//26
print(answer)

Solution (Python):
def f(x):
    x -= 1
    if (int(x / 26)):
        return f(int(x/26)) + chr((x % 26) + 97)
    return chr((x % 26) + 97)


n = int(input())

print(f(n))

Solution (Python):
n=int(input())
x=[]
for i in range(26):
	x.append(chr(ord('a')+i))

s=""
while(n>0):
	a=n%26
	if(a==0):
		a=26
		n=n//26-1
	else:
		n=n//26
	s=x[a-1]+s
print(s)

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

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

print(ans)

Solution (Python):
n=int(input())-1
m=n;i=0;lst=[]
while m>=0:
    i+=1;k=m;m-=26**i
    k
while k>0:
    lst.append(k%26)
    k//=26
for j in range(i-len(lst)):
    lst.append(0)
print(''.join([chr(b+97) for b in lst][::-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)

S = num2alpha(n)
A = S.lower()
print(A)

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

a="abcdefghijklmnopqrstuvwxyz"
aa=list(a)

stra=""
kk=n
for i in range(15):
    ki=(kk-1)%26+1
    if ki!=0:
        stra=aa[ki-1]+stra    
    else:
        stra=aa[25]+stra    
    kk=(kk-ki)//26

    if kk==0:
        break
    
print(stra)

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 main():
    import sys
    input = sys.stdin.readline
    from bisect import bisect_left
    N = int(input())
    if N == 1:
        print("a")
        sys.exit()
    d = [chr(i) for i in range(97, 97+26)]
    X = [0, 26]
    y = 26
    while y < 10**15:
        y *= 26
        X.append(X[-1] + y)
    x = bisect_left(X, N) 
    a = N - X[x-1] - 1
    ans = []
    while a > 0:
        ans.append(a%26)
        a //= 26
    while len(ans) < x:
        ans.append(0)
    for a in reversed(ans):
        print(d[a], end="")
    print()

if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
ans = ""
while N:
    N, m = divmod(N, 26)
    if m==0:
        N -= 1
        m += 26
    ans = chr(m+96) + ans
print(ans)

Solution (Python):



n = int(input())

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)])
print((alphabet_decimal(n)).lower())

Solution (Python):
import math

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

x = N
keta = [0]*100
i = 0
while x > 0:
    if x % 26 == 0:
        keta[i] = 26
    else:
        keta[i] = x % 26
    x -= keta[i]
    x = int(x / 26)
    i += 1

ans = ""
for p in range(i):
    ans = al[keta[p]-1] + ans

print(ans)

Solution (Python):

import sys
input = sys.stdin.readline

n = int(input())
index = []
while n > 0:
    index.append(n % 26)
    if n % 26 == 0:
        n -= 26
    n //= 26
index.reverse()
ans = ""
for item in index:
    if item == 0:
        ans += "z"
    else:
        ans += chr(ord("a") + item - 1)
print(ans)

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

Solution (Python):
N = int(input())
char = [chr(ord('a') + i) for i in range(26)]
res = ''
while N > 0:
    r = N % 26
    res += char[r-1]
    N //= 26
    if r == 0:
        N -= 1
print(res[::-1])

Solution (Python):
L=[26**i for i in range(13)]

gun=[sum(L[1:i])for i in range(2,13)]

N=int(input())
i=0
while N > gun[i]:
  i += 1

if i != 0:
  N = N - gun[i-1] 
N -= 1

L=[]
for k in range(1,i+2):
   L.append(N//(26**(i+1-k)))
   N = N % (26**(i+1-k))

L=[chr(i+97) for i in L]

print(''.join(L))

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)
print(ans.lower())

Solution (Python):
n = int(input())
arfa = ['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']
str = ''
while n > 26:
  amari = n % 26
  n = n // 26 
  if amari == 0:
    n -= 1
  str += arfa[amari-1]
str += arfa[n-1]
print(str[::-1])

Solution (Python):
import string
import math
n = int(input())
ans = []
ans1= []
count=1
while n>0:
    ans.append(n%26)
    n-=26
    n=math.ceil(n/26)
ans.reverse()
for i in ans:
    ans1.append(string.ascii_lowercase[i-1])

print("".join(ans1))

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)

N = num2alpha(N)
N_list = list(str(N))

n_arr = []
for str in N_list:
    n_arr.append(str.lower())
    
for i in n_arr:
    print(i, end="")

Solution (Python):
import string
N = int(input()) - 1
a = list(string.ascii_lowercase)
ans = ''
tmp = 0
m = 0
while True:
    m, v = divmod(N, 26)
    if m == 0:
        N = m
    else:
        N = m - 1
    ans += a[v]
    if N <= 25:
        break
if m != 0:
    ans += a[N]
print(ans[::-1])

Solution (Python):
n = int( input() )
bound = [ 26 ]
add = 26
while bound[ -1 ] < 1000000000000001:
    add *= 26
    bound.append( add + bound[ -1 ] )

d = 0
while bound[ d ] < n:
    d += 1

k = n - bound[ d - 1 ] - 1

alphabet = [chr(i) for i in range(97, 97+26)]
conv = []
for _ in range( d + 1 ):
    conv.append( k % 26 )
    k = k // 26

ans = []
for c in conv:
    ans.append( alphabet[ c ] )

print( "".join( reversed( ans[ : d + 1 ] ) ) )

Solution (Python):
def main():
    n = int(input())
    ans = ''
    while 1:
        p,q = divmod(n,26)
        n = p-1 if q==0 else p
        if q==0:
            ans = 'z'+ans
        else:
            ans = chr(ord('a')-1+q)+ans
        if n==0:
            break
    print(ans)

main()

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

DIV = 26

mojiretsu = ''

NUM = 97

i = 1

minus = 0

while(True):
    minus += DIV ** (i - 1)
    mod = (N - minus) % (DIV ** i)
    new_sho = mod // DIV ** (i - 1)
    mojiretsu = chr(NUM + new_sho) + mojiretsu
    sho = (N - minus) // (DIV ** i)
    if sho == 0:
        print(mojiretsu)
        break
    i += 1

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

cnt = 0
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 range(10):
    n_judge = (n-1)//(26**(i+1))
    if n_judge >= 1:
        cnt += 1
        n -= 26**(i+1)
    else:
        break

for j in range(cnt+1):
    n_ = (n-1)//26**(cnt-j)
    ans.append(alphabet[n_])
    n %= 26**(cnt-j)

ans = "".join(ans)
print(ans)

Solution (Python):
al=["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>=1:
    n1=n//26
    a=n%26
    if a==0:
        ans.append("z")
        n=n1-1
        
    else:
        ans.append(al[a])
        n=n1

ans2=list(reversed(ans))
for i in range(len(ans2)):
    print(ans2[i], end="")

Solution (Python):
import string
N = int(input()) - 1
a = list(string.ascii_lowercase)
ans = ''
tmp = 0
m = 0
while True:
    m, v = divmod(N, 26)
    if m == 0:
        N = m
    else:
        N = m - 1
    ans += a[v]
    if N <= 25:
        break
if m != 0:
    ans += a[N]
print(ans[::-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)

from decimal import *
N=(input())
d=Decimal(N)
aaa="0abcdefghijklmnopqrstuvwxyz"


print(num2alpha(d).lower())

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


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