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 math
N_MAX = 1 ** 15
letters=list("abcdefghijklmnopqrstuvwxyz")
A_TO_Z = len(letters)
N = int(input())

temp = N
cnt = 1
while temp - A_TO_Z ** cnt > 0:
  temp -= A_TO_Z ** cnt
  cnt += 1
r = [0] * cnt
  
q = temp - 1
while q > 0:
  r[cnt-1] = q % A_TO_Z
  cnt -= 1
  q = q // A_TO_Z
for i in r:
  print(letters[i],end="")

Solution (Python):

N = int(input().strip())

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

ans = ""
if N <= 26:
    ans = l[N-1]
else:
    for i in range(1,11):
        st = 0
        for k in range(i):
            st = st + 26**(k+1)
        nd = st + 26**(i+1)
        if st < N <= nd:
            N = N - st
            for j in range(i+1):
                r = N % 26
                N = N // 26
                if r != 0:
                    N += 1
                    ans = l[r-1] + ans
                if r == 0:
                    ans = "z" + ans
            break

print(ans)

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

ans = ""
for _ in range(1, 15):
  x = n % 26
  if x == 0:
    x = 26
  ans += chr(96 + x)
  n -= x
  if n == 0:
    break
  n //= 26
  
print(ans[::-1])

Solution (Python):

N = int(input())

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

print(ans[::-1])

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

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

print(ans[::-1])

Solution (Python):
import string
n = int(input())
alphabet = list(string.ascii_lowercase)
ans = ''
while n > 0:
    ans = alphabet[(n-1) % 26] + ans
    n = (n-1) // 26
print(ans)

Solution (Python):
n=int(input())
c=""
while n:
    n-=1
    c=chr(n%26+97)+c
    n//=26
print(c)

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

print(ans)

Solution (Python):
n = int(input())
chars = 'Xabcdefghijklmnopqrstuvwxyz'
res = ''
while True:
    x = n%26 
    if x == 0: 
        x = 26
    res += chars[x] 
    n -= x 
    if n == 0 :
        break
    n //= 26 

print(res[::-1])

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

Solution (Python):
n = int(input())
chars = 'Xabcdefghijklmnopqrstuvwxyz'
res = ''
while True:
    x = n%26
    if x == 0:
        x = 26
    res += chars[x]
    n -= x
    if n == 0 :
        break
    n //= 26
print(res[::-1])

Solution (Python):
n = int(input())
chars = 'Xabcdefghijklmnopqrstuvwxyz'
res = ''
while True:
    x = n%26
    if x == 0:
        x = 26
    res += chars[x]
    n -= x
    if n == 0 :
        break
    n //= 26
print(res[::-1])

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

for i in range(1,99):
    if 26**i >= N:
        N -= 1
        for s in range(i):
            ans += chr(ord('a') + N%26)
            N //= 26
        break
    else:
        N -= 26**i

print(ans[::-1])

Solution (Python):
n=int(input())
s='abcdefghijklmnopqrstuvwxyz'

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

print(ans[::-1])

Solution (Python):
n=int(input())
n=n-1
a=[]
q=n//26
r=n%26
a.insert(0,r)
while q>=26:
    q=q-1
    r=q%26
    a.insert(0,r)
    q=q//26
a.insert(0,q-1)
b=[]
for i in range(len(a)):
    x=int(a[i])
    if x<0:
        x=0
    else:
        x=chr(x+97)
        b.append(x)
c="".join(b)
print(c)

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

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

print(ans)

Solution (Python):
X = int(input())
d = {}
for i in range(0, 26):
    d[i+1] = chr(97+i)
a = []
while X > 0:
    if X%26 != 0:
        a.append(d[(X % 26)])
        X -= X % 26
    else:
        a.append(d[26])
        X -= 26
    X //= 26
for i in a[::-1]:
    print(i, end='')
print()

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

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

print(ans)

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

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

ans = ""
while N > 0:

    N -= 1

    q, r = N//26, N%26

    ans += chr(ord("a") + r)

    N = q

print(ans[::-1])

Solution (Python):
n=int(input())-1
radix=26
ord_a=97

ans=""
while n>=0:
  n,m=divmod(n,radix)
  ans=chr(m+ord_a)+ans
  n-=1
print(ans)

Solution (Python):
n = int(input())
chars = "Xabcdefghijklmnopqrstuvwxyz"
n_rem = n
ans = ""
 
while True:
  x = n_rem % 26
  if x == 0:
      x = 26
  ans += chars[x]
  n_rem -= x
  if n_rem == 0:
    break
  n_rem //= 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, ans = int(input()), ''
while N > 0:
    N -= 1
    ans += chr(N % 26 + ord('a'))
    N //= 26
print(ans[::-1])

Solution (Python):
import sys
def Ii():return int(sys.stdin.readline())
def Mi():return map(int,sys.stdin.buffer.readline().split())
def Li():return list(map(int,sys.stdin.buffer.readline().split()))

n = Ii()
i = 0;
s = [chr(ord('a') + i) for i in range(26)]
a = []
while n >= 1:
	a.append(s[n%26-1])
	n = (n-1) // 26
    
print(''.join(a)[::-1])

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

s=""
keta=0
n-=1
while 1 :
    c = n%26
    s=chr( 97+c )+s
    if n//26>0 :
        n=n//26
        n-=1
        keta+=1
    else:
        break

print(s)

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

Solution (Python):
n = int(input())
ans = ""
for i in range(11):
    n2 = (n-1)%26
    ans = chr(97+n2)+ans
    n = int((n-1)/26)
    
    if n == 0:
        break
print(ans)

Solution (Python):
N = int(input())
A = "abcdefghijklmnopqrstuvwxyz"
x = [A[(N-1)%26]]
N -= 26
i = 1
while N > 0:
    x.append(A[((N-1)//(26**i))%26])
    i += 1
    N -= 26**i
ans = ""
for i in range(1,len(x)+1):
    ans += x[-i]
print(ans)

Solution (Python):
def solve(n):
    import math
    m = 26
    nn = n - 1
    for i in range(1, m + 1):
        p = m ** i
        if p > nn:
            break
        nn -= p
    s = ''
    for j in range(1, i + 1):
        p = m ** (i - j)
        x, nn = divmod(nn, p)
        s += chr(x + ord('a'))
    return s

def main(istr, ostr):
    n, = list(map(int, istr.readline().strip().split()))
    result = solve(n)
    print(result, file=ostr)


if __name__ == "__main__":
    import sys

    main(sys.stdin, sys.stdout)

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

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

ans=[]
while(1):
    if N==0:
        break
    tmp=N%26
    if tmp==0:
        ans.append(26)
        N=N//26-1
    else:
        N//=26
        ans.append(tmp)
        
new_ans = list(reversed(ans))
ANS=""

for i in new_ans:
    ANS+=chr(96+int(i))
print(ANS)

Solution (Python):
import sys
import numpy as np
from math import ceil as C, floor as F
from collections import defaultdict as D
 
def S(): return sys.stdin.readline().rstrip().split(' ')
def Ss(): return list(S())
def I(): return _I(S())
def Is(): return list(I())
def _I(ss): return map(int, ss) if len(ss) > 1 else int(ss[0])
 
N = I()
alp = 'abcdefghijklmnopqrstuvwxyz'
 
def get_name(n, name):
  n = n-1
  
  if n <= 25:
    return '{}{}'.format(alp[n], name)
  
  q = F(n / 26)
  r = n % 26
  return get_name(q, '{}{}'.format(alp[r], name))
 
print(get_name(N, ''))

Solution (Python):


n = int(input())

r = ''

def to_moji(x: int):
    if x == 0:
        x = 26
    return chr(96 + x)

def devide(x, moji):
    a = x // 26
    b = x % 26

    if b == 0:
        a -= 1

    if a < 1:
        moji = to_moji(b) + moji
        return moji
    elif 1 <= a and a <= 26:
        moji = to_moji(b) + moji
        moji = to_moji(a) + moji
        return moji
    else:
        moji = to_moji(b) + moji
        return devide(a, moji)

print(devide(n, r))

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

ans = []

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

for j in reversed(range(len(ans))):
  print(ans[j], end = '')

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

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

print(ans[::-1])

Solution (Python):
n = int(input())
abc = 'abcdefghijklmnopqrstuvwxyz'
ans = ''
while n != 0:
    n -= 1
    ans += abc[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):
def main():
    N = int(input())
    A = []
    temp = 0
    sum = 0
    i = 1
    while True:
        temp = 0
        i += 1
        sum += 1
        for j in range(1,i,1):
            temp += 26**j
        if N <= temp:
            break
    
    if sum == 1:
        N = N-1
    else:
        temp = 0
        for j in range(1,sum):
            temp += 26**j
        N -= (temp+1)

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

    B = [0]*len(A)
    for i in range(len(A)-1,-1,-1):
        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'}
        B[i] = dict[A[i]]

    ans = [0]*len(B)
    for j in range(len(B)):
        ans[j] = B[len(B)-1-j]

    print(''.join(ans))

main()

Solution (Python):
n=int(input())
ans=[]
for i in range(1,99):
    if 26**i>=n:
        n-=1
        for j in range(i):
            key=chr(ord("a")+(n%26))
            ans.append(key)
            n=n//26
        break
    else:
        n-=26**i
        
ans.reverse()
for i in range(len(ans)):
    if i!=len(ans)-1:
        print(ans[i],end="")
    else:
        print(ans[i])

Solution (Python):

N = int(input())
alpha_list = "abcdefghijklmnopqrstuvwxyz"
ans = ""
moji_list = []
while(N != 0):
    tmp = N % 26
    if(tmp == 0):
        tmp = 26
    moji_list.append(alpha_list[tmp-1])
    N = (N - tmp) // 26
for hoge in reversed(moji_list):
    ans += hoge
print(ans)

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

alpha_list = "abcdefghijklmnopqrstuvwxyz"

ans = ""
moji_list = []
while(N != 0):
    tmp = N % 26
    
    if(tmp == 0):
        tmp = 26
    
    moji_list.append(alpha_list[tmp-1])

    N = (N - tmp) // 26



for hoge in reversed(moji_list):
    ans += hoge

print(ans)

Solution (Python):
from string import ascii_lowercase


def solve(string):
    n = int(string)
    ans = ""
    while n:
        n, c = divmod(n - 1, len(ascii_lowercase))
        ans = ascii_lowercase[c] + ans
    return ans


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))

Solution (Python):
from string import ascii_lowercase
from itertools import accumulate


def solve(string):
    n = int(string)
    t = [0] + [len(ascii_lowercase)**i for i in range(1, 12)]
    *t, = accumulate(t)
    l = 0
    ans = ""
    while t[l] < n:
        l += 1
    n -= t[l - 1] + 1
    for i in range(l - 1):
        j, n = divmod(n, len(ascii_lowercase)**(l - i - 1))
        ans += ascii_lowercase[j]
    ans += ascii_lowercase[n]
    return ans


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))

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

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

ans = ""
k = 0
while n // (26**(k)) > 0:
    ans = ans + str(chr(((n-1) % (26**(k+1))+1)//(26**k) + 96))
    n = n - ((n-1) % (26**(k+1))+1)
    k += 1

print(ans[::-1])

Solution (Python):
import math
def facts(n):
    ans = []
    for  i in range(1, int(math.sqrt(n)+1)):
        if(n%i==0):
            ans.append(i)
            ans.append(n//i)
    ans = sorted(list(dict.fromkeys(ans)))
    if(ans[-1]==n):
        ans = ans[:-1]
    return ans

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

Solution (Python):


import string

def getOrdOfAlphabet(s):
    return ord(s) - 64


def getAlphabetByNum(n):
    alphabets = string.ascii_lowercase
    return alphabets[n - 1]



N = int(input())

dog_name = ''

while N > 0:
    
    N -= 1
    mod = N % 26
    dog_name += getAlphabetByNum(mod + 1)
    N //= 26



print(dog_name[::-1])

Solution (Python):
import string

n = int(input())
num = {k:v for k,v in zip(range(26),string.ascii_lowercase)}


ans = ""
while True:
    n -= 1
    ans += num[n % 26]
    n //= 26
    if (n == 0): 
        print(ans[::-1])
        exit()

Solution (Python):
n = int(input())
s = 'abcdefghijklmnopqrstuvwxyz'
ans = ''
while n > 0:
    n -= 1

    ans = s[n%26] + ans
    n = n // 26
print(ans)

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

number = N
answer = ''

while number >= 1:
    x = number % 26
    if x == 0:
        x = 26
        number -= 26

    answer = chr(96+x) + answer

    number //= 26

print(answer)

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 = []
if N <= 26:
    print(chr(96 + N))
else:
    while N != 0:
        val = N % 26
        if val == 0:
            val = 26
            N = N //26 - 1
        else:
            N //= 26
        ans.append(chr(96 + val))
    ans.reverse()
    print(''.join(ans))

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

ans = ''

for i in range(13):
    if n >= 26 and n%26 == 0:
        ans = 'z' + ans
        n -= 26
    else:
        ans = chr(97 -1 + n%26) + ans
        n -= n%26

    n = n //26

print(ans.replace("`", ""))

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())
char = list("abcdefghijklmnopqrstuvwxyz")
name = ""
while n > 0:
    n -= 1
    name = char[n % 26] + name
    n = n // 26
print(name)

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

Solution (Python):
import string
N = int(input())
strings = string.ascii_lowercase
ans = ""

index = 26
cnt = 1

while N > index:
    N -= index
    index *= 26
    cnt += 1

N -= 1
for _ in range(cnt):
    M = N % 26
    ans += strings[M]
    N //= 26



print(ans[::-1].rjust(cnt,'a'))

Solution (Python):
import string
low = string.ascii_lowercase

N = int(input())
st = ''
while N != 0:
    rem = N%26
    if rem == 0:
        rem = 26
    N -= rem
    N = N//26
    st += low[rem-1]
    
print(st[::-1])

Solution (Python):
chars = [chr(i) for i in range(ord('a'), ord('z') + 1)]

arr = []

x = int(input())


def get_len(n):
    length = 1
    t = 26

    while True:
        if n <= t:
            return length
        t += 26 ** (length + 1)
        length += 1

        if length > 1000000000000001:
            raise


def get_ord(n):
    st = 1
    end = 26
    ind = 1
    while True:
        if st <= n <= end:
            return x - st

        st = end + 1
        end += 26 ** (ind + 1)
        ind += 1


length = get_len(x)
order = get_ord(x)


for i in range(length):
    s = order % 26
    order = order // 26
    arr.append(s)



ans = ""
for ai in arr[::-1]:
    ans += chars[ai]
print(ans)

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

alp = "abcdefghijklmnopqrstuvwxyzz"
ans = ""

while(N != 0):
    a = (N % 26)
    ans = alp[a-1] + ans

    if a != 0:
        N = int((N-a)/26)
    else:
        if N == 26 : break
        N = int((N-26)/26)

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

def solve():
    ans = ''
    res = N
    q = 26
    while q > 0:
        q, r = divmod(res, 26)
        res = q-1
        ans = chr(ord('a') + r) + ans
    return ans

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

Solution (Python):
ini = lambda : int(input())
inm = lambda : map(int,input().split())
inl = lambda : list(map(int,input().split()))
gcd = lambda x,y : gcd(y,x%y) if x%y else y
n = ini()
b = ''
while n > 0:
        n -= 1
        b += chr(ord('a') + n%26)
        n = n//26
print(b[::-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 = ''
while n:
    ans += abc[(n-1)%len(abc)]
    n = (n-1)//len(abc)
print(ans[::-1])

Solution (Python):
N = int(input())
for D in range(1, 10000000):
  if N <= 26 ** D:
    break
  N -= 26 ** D

N -= 1

ans = []
for d in range(D):
  ans.append(chr(ord('a') + N % 26))
  N //= 26
print(''.join(ans[::-1]))

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)

print(num2alpha(int(input())))

Solution (Python):
chars = [chr(i) for i in range(ord('a'), ord('z') + 1)]

arr = []

x = int(input())

while True:
    s = x % 26
    arr.append(s)

    t = (x - 1) // 26
    
    if t == 0:
        break
    x = t



ans = ""
for t in arr:
    if t == 0:
        ans += 'z'
    else:
        ans += chars[t - 1]

ans = ans[::-1]
print(ans)

Solution (Python):
s = []


def name(n):
    n -= 1
    s.append(chr(n % 26 + 97))
    if n // 26 != 0:
        name(n // 26)
    return s[::-1]


print(*name(int(input())), sep="")

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

Solution (Python):
from collections import deque

n = int(input())
tmp = 2 
alpha = ['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 = deque()
len1 = 0
for i in range(1,100):
    if (n <= 26 ** i):
        len1 = i
        break
    else:
        n = n - 26**i

n = n -1
for i in range(len1):
    tmp = n % 26
    ans.appendleft(alpha[tmp])
    n = int(n / 26)


for i in range(len(ans)):
    print(ans.popleft(),end ="")

Solution (Python):
alph = ['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())

str = ''
count = 0
while True:
  n -= 26 ** count
  if n < 26 ** (count + 1):
    while count != 0:
      mod = 26 ** count
      num_1 = n // mod
      n %= mod
      str = str + alph[num_1]
      count -= 1
    break
  count += 1
str = str + alph[n]
print(str)

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

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

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

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

if __name__ == "__main__":
    resolve()

Solution (Python):
N = int(input())
alp_list = ['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(1,12):
  if N <= 26 ** i:
    N -= 1
    for j in range(i):
      ans.append(alp_list[N % 26])
      N  = N // 26
    break
  else:
    N -= 26 ** i
ans.reverse()
print("".join(ans))

Solution (Python):
N = int(input())
alp_list = ['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(1,12):
  if N <= 26 ** i:
    N -= 1
    for j in range(i):
      ans += alp_list[N % 26]
      N  = N // 26
    break
  else:
    N -= 26 ** i
ans.reverse()
print("".join(ans))

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

M = 0
for i in range(1, 1000000):
    M += 26 ** i
    if M > N:
        break

N -= (M - 26**i)

for j in reversed(range(i)):
    K = N // (26 ** j)
    s += chr(K + 97)
    N -= K * (26 ** j)

print(s)

Solution (Python):





















































global FLAG_LOG
FLAG_LOG = False


def log(value):
    
    FLAG_LOG = False
    if FLAG_LOG:
        print(str(value))


def calculation(lines):
    
    N = int(lines[0])
    
    
    
    
    
    
    
    
    

    alp = 'abcdefghijklmnopqrstuvwxyz'

    
    q = N - 1
    result = ''

    
    while True:
        q, mod = divmod(q, 26)
        result = alp[mod] + result
        if q == 0:
            return [result]
        q -= 1

    return ['error']



def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines



def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['2']
        lines_export = ['b']
    if pattern == 2:
        lines_input = ['27']
        lines_export = ['aa']
    if pattern == 3:
        lines_input = ['123456789']
        lines_export = ['jjddja']
    return lines_input, lines_export



def get_mode():
    import sys
    args = sys.argv
    global FLAG_LOG
    if len(args) == 1:
        mode = 0
        FLAG_LOG = False
    else:
        mode = int(args[1])
        FLAG_LOG = True
    return mode



def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(1)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    
    
    
    
    
    
    
    
    
    
    



if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
c = list('abcdefghijklmnopqrstuvwxyz')

ans = []
def calc(k):   
    if k == 0:
        return ''
    else:
        k -= 1
        return calc(k // 26) + c[k % 26]

print(calc(n))

Solution (Python):
N = int(input())
L = list("abcdefghijklmnopqrstuvwxyz")
a = 1
while N > 26**a:
    N = N - 26**a
    a += 1
 
pre = []
for i in reversed(range(1,a)):
    r = (N-1) // 26**i
    pre.append(r)
    N = int(N%(26**i))
 
ans = ''
for i in pre:
    ans += L[i]
print(ans+L[N-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):
from string import ascii_lowercase
N = int(input())

k = [0, 26]
for i in range(1, 13):
    k.append(26 * (k[i] + 1))

for i in range(13):
    if k[i] + 1 <= N <= k[i+1]:
        n = N - (k[i] + 1)

        for j in range(i, -1, -1):
            print(ascii_lowercase[(n//26**j) % 26], end="")

Solution (Python):
def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X % n)
    return int(X % n)


def main():
    n = int(input())
    alphabets = list(chr(i)for i in range(97, 123))
    ans = ''
    while n != 0:
        n -= 1
        ans += alphabets[n % 26]
        n //= 26
    print(ans[::-1])


if __name__ == "__main__":
    main()

Solution (Python):
import string
n = int(input())
s = string.ascii_lowercase
ans = ''
while n != 0:
    n -= 1
    ans += s[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):
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())
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())
s = ""
while N != 0:
    N -= 1
    r = N % 26
    s += chr(ord('a') + r)
    N //= 26

print(s[::-1])

Solution (Python):
def conv(N):
    ans = []
    while True:
        n = N % 26 if N % 26 != 0 else 26
        alph = chr(96 + n)
        ans.append(alph)
        N = int((N-n)/26)
        if N == 0:
            break
    return "".join(ans[::-1])


if __name__ == "__main__":
    n = int(input())
    print(conv(n))

Solution (Python):

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

from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


def sum_of_arithmetic_progression(s, d, n):
    return n * (2 * s + (n - 1) * d) // 2


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


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


def solve():
    N = int(input())
    v = []
    while N:
        N -= 1
        v.append(N % 26)
        N //= 26
        if N == 0:
            break

    ans = ""
    for x in v:
        ans += chr(ord('a') + x)
    print(ans[::-1])


def main():
    solve()


if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
L = list("abcdefghijklmnopqrstuvwxyz")
a = 1
while N > 26**a:
    N = N - 26**a
    a += 1

pre = []
for i in reversed(range(1,a)):
    r = (N-1) // 26**i
    pre.append(r)
    N = int(N%(26**i))

ans = ''
for i in pre:
    ans += L[i]
print(ans+L[N-1])

Solution (Python):
s='abcdefghijklmnopqrstuvwxyz'
n=int(input())
def number_of_alphabets(n):
    i=1
    g=0
    while g<n:
        g+=26**i
        i+=1
    return(i-1)
def what(num):
    g=0
    for i in range(num):
        g+=26**i
    return g
num=number_of_alphabets(n)
name=['a']*num
x=what(num)
n-=x
num-=1
for i in range(num,-1,-1):
    o=n//26**i
    name[num-i]=s[o]
    n=n-o*26**i
print(''.join(name))

Solution (Python):
N = int(input())
alp_list = ['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(1,99):
  if N <= 26 ** i:
    N -= 1
    for j in range(i):
      ans += alp_list[N % 26]
      N  = N // 26
    break
  else:
    N -= 26 ** i
print(ans[::-1])

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

n = N
ans = ''
while True:
    n, x = divmod(n, 26)
    if x == 0:
        if n == 0:
            break
        else:
            x = 26
            n -= 1
    ans = chr(x + 97 - 1) + ans

print(ans)

Solution (Python):
N=int(input())
i=0
j=1
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']
S=""
while i<N:
    i+=26**j
    j+=1
N-=i-26**(j-1)
if N==26**(j-1):
    print("z"*(j-1))
    exit()
for i in reversed(range(j-1)):
    if i!=0:
        a=N//26**i
        S+=l[a]
        N-=a*(26**i)
    else:
        S+=l[N-1]
    if N==0:
        S=S[:len(S)-1]
        S+=l[a-1]
        S+="z"*i
        break
print(S)

Solution (Python):
from string import ascii_lowercase

def main():
    N=int(input())
    alphabet = ascii_lowercase
    ans = ''
    while N>0:
        N -= 1
        ans += alphabet[N%26]
        N//=26
    print(ans[::-1])

main()

Solution (Python):
from sys import stdin
import sys

n = int(stdin.readline().rstrip())

s = ""
alp = "abcdefghijklmnopqrstuvwxyz"
b = n
while True:
    a = b % 26
    b = (b-1) // 26

    if a != 0:
        s = alp[a-1] + s
    else:
        s = "z" + s

    if b == 0: break

print(s)

Solution (Python):
from itertools import count
from string import ascii_lowercase

N = int(input())
N -= 1

name = ''
for i in count(1):
    if N < 0:
        break
    else:
        name = ascii_lowercase[N % 26] + name
        N = N // 26 - 1

print(name)

Solution (Python):


N = int(input())

Q = [N]
R = []
name =[]
i = 0

while Q[i] != 0:
    if Q[i] % 26 == 0:
        Q.append(Q[i] // 26 - 1)
    else:
        Q.append(Q[i] // 26)
    R.append((Q[i]-1) % 26 + 1)
    i += 1



while i != 0 :
    i -= 1
    name.append(chr(R[i]+96))

print(''.join(name))

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

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