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
i=int(input())
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=""
a=0
b=0
for k in range (100):
    a+=math.pow(26,k+1)
    if i<=a:
        co=k+1
        break
    b+=math.pow(26,k+1)

i=i-b-1
for k in range(co):
    j=int(i%26)
    ans=alphabet[j]+ans
    i=i//26

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

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

def can_devide(num):
    return num > 26

def get_alpha(alp):
    apls = [chr(i) for i in range(97, 97+26)]
    return apls[alp - 1]


ans = ""

while True:
    alp = N % 26

    ans += get_alpha(alp)
    
    if alp == 0:
        N = N // 26 -1
    else:
        N = N // 26 
        
    if N == 0:
        break



print(ans[::-1])

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


str = []

while N > 0:
    if N%26 == 0 :
        str.append("z")
        N//=26
        N -=1
    else:
        str.append(chr((N%26)+96))
        N //= 26
    



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

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):
import sys
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"]
result = []
def alphabet_decimal(v):
    quotient = math.floor(v / len(al))
    surplus = v % len(al)
    quotient -= 1 if surplus == 0 else 0
    surplus = len(al) if surplus == 0 else surplus
    result.append(surplus)
    if len(al) < quotient:
        alphabet_decimal(quotient)
    elif len(al) < v:
        result.append(quotient)
    return "".join([al[i - 1] for i in reversed(result)])

print(alphabet_decimal(int(n)))

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

for i in range(12):
    n = n - 1
    ret = n%26 
    string = chr(ret+97) + string
    if n<26:
        break
    n = int((n - ret) / 26)
print(string)

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

Solution (Python):
n=int(input())
hoge=[-1 for i in range(15)]
alf="abcdefghijklmnopqrstuvwxyz"
for i in range(15):
  if(n==0):
    break
  else:
    n=n-1
    hoge[i]=(n%26)
  n=(n-n%26)//26
hoge=hoge[::-1]

for i in range(len(hoge)):
  if(hoge[i]!=-1):
    print(alf[hoge[i]],end="")

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

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

ans = n2a(N)
print(ans)

Solution (Python):
alphabet="abcdefghijklmnopqrstuvwxyz"

N=int(input())

left = N-1

ans = ""
while True:
    idx = left % 26
    left = left // 26 -1 
    ans = alphabet[idx] + ans
    

    if left == -1:
        break

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

out = ""

from string import ascii_lowercase
from math import ceil
while n:
    out = ascii_lowercase[n % 26 - 1] + out
    
    n = (n - 1) // 26

print(out)

Solution (Python):
N=int(input())
seen=[]
ans=""
count=1
while N>0:
    mod=26
    k=(N-1)%mod
    seen.append(k+1)
    N=(N-k-1)//mod

for x in seen[::-1]:
    ans+=chr(96+x)
print(ans)

Solution (Python):
import math

def main():
    N = int(input())
    lowercase = 'abcdefghijklmnopqrstuvwxyz'
    ans = ''
    for i in range(len(str(N))):
        j = N % 26
        if N == 0:
            break
        if j == 0:
            N = N // 26 - 1
        else:
            N = N // 26
        ans = lowercase[j-1] + ans
        
    print(ans)

if __name__ == '__main__':
    main()

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

while (n != 0):
    s = n // 26
    t = n % 26
    if (t == 0):
        s -= 1
        t += 26
    p = string.ascii_lowercase[t-1]
    ans = p+ans
    n = s
print(ans)

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

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

exponent = 1
res = n
lst = [alphabet[res % 26]]
res //= 26
while res != 0:
    res -= 1
    lst.append(alphabet[res % 26])
    res //= 26

lst.reverse()
print("".join(lst))

Solution (Python):


def convert_base_number(new_base, target) :
    result = []

    while True :
        dig = target % new_base
        target = target // new_base
        result.append(dig)

        if (target == 0) :
            break

        
        
        
        

    return result











def get_alpha(number) :
    base = ord('a')
    return chr(base + number)


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)


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

    
    
    
    
    
    
    


main()

Solution (Python):
n=int(input())
l=1
c=1
while(1):
    c+=26**l
    if n/c<1:
        c-=26**l
        break
    else:
        l+=1

S = list('abcdefghijklmnopqrstuvwxyz')
tmp_n=n-c
tmp=0
tmp_ans=[]
for i in range(l):
    tmp = (tmp_n)//26**((l-1)-i)
    tmp_n -= tmp*26**(l-1-i)
    tmp_ans.append(S[tmp])
print("".join(tmp_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())
print(num2alpha(n).lower())

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 sys

class alphabet: 
    def __init__(self, capitalize):
        self.num = dict() 
        self.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"]
        if capitalize: 
            for i in range(26): self.abc[i] = self.abc[i].upper()
        for i, a in enumerate(self.abc): self.num[a] = i


def solve():
    input = sys.stdin.readline
    N = int(input())
    AB = alphabet(False)
    Ans = ""
    while N > 0:
        N -= 1
        Ans = AB.abc[N % 26] + Ans
        N //= 26
        
    
    print(Ans)

    return 0

if __name__ == "__main__":
    solve()

Solution (Python):
N = int(input())
S = "_abcdefghijklmnopqrstuvwxyz"
ans = ""
while N > 0:
    if N%26 != 0:
        ans += S[N%26]
    else:
        ans += "z"
        N -= 1
    N = N//26

print(ans[::-1])

Solution (Python):
N = int(input())
char = [i for i in range(97, 97+26)]
a_n = 96
base = 26
base_list = []
ans = ''

while N > 0:
    add = N % 26
    if add==0:
        add=26
    ans += chr(a_n+add)
    N = (N-1) // 26












print(ans[::-1])

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

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

print(num2alpha(num).lower())

Solution (Python):
n = int(input())
ans = []
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):
string = 'abcdefghijklmnopqrstuvwxyz'

num = int(input())
ans = ""
while num != 0:
    num, m = divmod(num, 26)
    if m == 0:
        ans = string[m-1] + ans
        num = num - 1
    else:
        ans = string[m-1] + ans

print(ans)

Solution (Python):
def Quadrillion():

    Num = int(input())

    moji = num2alpha(Num)

    print(moji)

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)

if __name__ == '__main__':
    Quadrillion()

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):
n = int(input())
n=n-1
def f(n):
    q, mod = divmod(n,26)
    if q==0:
        return chr(97+mod)
    return f(q-1)+chr(97+mod)
print(f(n))

Solution (Python):
num=int(input())
def num2alpha(num):
    if num<=26:
        return chr(64+num)
    elif num%26==0:
        return num2alpha(num//26-1)+chr(90)
    else:
        return num2alpha(num//26)+chr(64+num%26)
ans=num2alpha(num)
print(str.lower(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)

num=int(input())
print(str.lower(num2alpha(num)))

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

count = 1
n = 26
while n < N:
    count += 1
    n = (n + 1) * 26


minues = 0
for i in range(count):
    minues += 26**i


answer_index = []
N -= minues
while count>0:
    answer_index.append(N%26)
    count -=1
    N //= 26

answer_list = []
for idx in reversed(answer_index):
    answer_list.append(alphabet[idx])

print("".join(answer_list))

Solution (Python):
import sys, math



if(__name__ == "__main__"):

    """
    26^2 = 676 -> 676+26 = 702: 2文字の最大値
    3文字の番号は26**3種類
    1文字のものが26 * 1, 2文字が26* (1+26), 3文字の最大値は26**3 + 27 * 26 = 26 * (27 + 26**2) = 36 * 703
    4文字の最大値は26 * 703 + 26**4 = 26 * (26**0 + 26**1 + 26**2 + 26**3) = 475254


    """

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

    Max_bef = 0
    Max = 1
    N_26 = N/26
    str_len = 1
    while(N_26 > Max):
        Max_bef = Max
        Max += 26**str_len
        str_len += 1
    Max_beforestr= Max_bef*26
    hash = N-Max_beforestr
    
    namelist = ["z"]*str_len

    num = str_len-1
    num2alpha = lambda c: chr(c+64)
    """
    d = num2alpha(25)
    print( d )
    aa -> 1
    ab -> 2
    az -> 26

    aaa -> 1
    aaz -> 26
    aba -> 27
    """

    while( num >= 0):
        remainder = hash%26
        if(remainder==0):
            remainder = 26
        d = num2alpha(remainder).lower()
        namelist[num]= d
        hash = math.ceil(hash/26)

        num -= 1

    Str = ""
    for i in range(str_len):
        Str += namelist[i]
    print(Str)

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

    alphabet = list('abcdefghijklmnopqrstuvwxyz')
    name = []

    while True:
        if N % 26:
            res = N % 26
        else:
            res = 26

        name.append(alphabet[res-1])

        if N - res == 0:
            break
        else:
            N = (N - res) // 26
    
    print(''.join(name[::-1]))

if __name__ == '__main__':
    main()

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

Solution (Python):
import sys
readline = sys.stdin.readline
alp = "abcdefghijklmnopqrstuvwxyz"


def main():
    N = int(readline())
    start = 1
    cnt = 1
    while True:
        last = start * 26
        if start <= N <= last:
            break
        start = last + 1
        cnt += 1
    
    idx = N - start  

    res = ""
    while cnt:
        chara = idx // 26 ** (cnt - 1)
        idx -= 26 ** (cnt - 1) * chara
        chara = alp[chara]
        res += chara
        cnt -= 1
    
    print(res)


if __name__ == '__main__':
    main()

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

N=int(input().rstrip('\n'))
alpha = [chr(i) for i in range(ord('a'), ord('z')+1)]
res = []
rest = N
for i in range(N):
  N1 = rest % 26
  rest = rest//26
  if N1>0:
    res.append(alpha[N1-1])
  else:
    res.append('z')
    rest -= 1
  if rest == 0:
    break
print(''.join(res[::-1]))

Solution (Python):
n = int(input())
lencnt = 1
lencut = 27
for i in range(1,12):
  if n<lencut:
    break
  else:
    lencnt += 1
    lencut = lencut+(26**lencnt)
ans = ""
rem = n
for i in range(lencnt,-1,-1):
  prevlencut = lencut-(26**i)
  quot = (rem-prevlencut)//(26**i)
  ans = ans + chr(quot+96)
  rem = rem-(quot*(26**i))
  lencut = int(prevlencut)
print(ans[1:])

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

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

print(main(n))

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


def dfs(n):
    global ans
    if n <= 26:
        ans += alpha[n%26]
        return ans[::-1]
    else:
        ans += alpha[n % 26]
        if n % 26 == 0:
            nn = n // 26 - 1
        else:
            nn = n // 26
        return dfs(nn)

print(dfs(N))

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

Solution (Python):
import sys
import math
from collections import deque
from collections import defaultdict

def main():
    n = int(sys.stdin.readline())
    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())
    return 0

if __name__ == "__main__":
    main()

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

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

Solution (Python):
N = int(input())
name = []
N = N - 1
while N >= 26:
    name.append(N % 26)
    N = int(N / 26) - 1
name.append(N)

def swap(X):
    if X == 0:
        return "a"
    elif X == 1:
        return "b"
    elif X == 2:
        return "c"
    elif X == 3:
        return "d"
    elif X == 4:
        return "e"
    elif X == 5:
        return "f"
    elif X == 6:
        return "g"
    elif X == 7:
        return "h"
    elif X == 8:
        return "i"
    elif X == 9:
        return "j"
    elif X == 10:
        return "k"
    elif X == 11:
        return "l"
    elif X == 12:
        return "m"
    elif X == 13:
        return "n"
    elif X == 14:
        return "o"
    elif X == 15:
        return "p"
    elif X == 16:
        return "q"
    elif X == 17:
        return "r"
    elif X == 18:
        return "s"
    elif X == 19:
        return "t"
    elif X == 20:
        return "u"
    elif X == 21:
        return "v"
    elif X == 22:
        return "w"
    elif X == 23:
        return "x"
    elif X == 24:
        return "y"
    elif X == 25:
        return "z"

swap_name = []
for i in range(len(name)):
    swap_name.append(swap(name[len(name)-i-1]))
print(*swap_name, sep="")

Solution (Python):
N=int(input())
n=N
c=1
while True:
  if n-26**c >0:
    n=n-26**c
    c+=1
  else:
    break
for i in range(1,c):
  N=N-26**i
Z=[]
N=N-1
for i in range(c-1):
  tmp = N // 26**(c-1-i)
  Z+=[tmp]
  N = N % 26**(c-1-i)
Z+=[N]
ans=""
for i in range(len(Z)):
  ans+=chr(97+Z[i])
print(ans)

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

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

if n == 0:
  print('z' * i)
  exit()
ls = [chr(i) for i in range(97, 97+26)]
ans = ''
n = n + x - 1
x = int(x / 26)
while x >= 1:
  j = n // x
  n = n % x
  x = int(x/26)
  ans += ls[j]
  
print(ans)

Solution (Python):
n = int(input())
l = []
while True:
    n -= 1
    t = n // 26
    s = n % 26

    l.append(chr(97+s))
    n = t
    if t == 0:
        break
l.reverse()
print(''.join(l))

Solution (Python):
n = int(input())
a = n-1
for i in range(30):
  a -= 26**(i+1)
  if a < 0:
    b = i
    c = a + 26**(i+1)
    break
l = []
for i in range(b+1):
  l.append(c % 26)
  c = c //26
cha = ['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(b+1):
  t = cha[l[b-i]]
  ans += t
print(ans)

Solution (Python):


import sys
import pprint


sys.setrecursionlimit(10 ** 6)

class Logger:
	def __init__(self, debug):
		self.debug = debug
	def print(self, *args):
		if self.debug:
			pprint.pprint(args)

def Base_10_to_n(X, n):
    X_dumy = X
    out = ''
    while X_dumy>0:
        out = str(X_dumy%n)+out
        X_dumy = int(X_dumy/n)
    return out

def main():
	log = Logger(0)
	n = int(sys.stdin.readline())
	d = "abcdefghijklmnopqrstuvwxyz"
	s = []
	while n > 0:
		log.print(n // 26, n % 26)
		s.append(n % 26)
		if n % 26 == 0:
			n //= 26
			n -= 1
		else:
			n //= 26

	ans = ""
	for si in s[::-1]:
		ans += d[si - 1]
	print(ans)


main()

Solution (Python):
def check(mid,n):
    total = 26*(pow(26,mid)-1)//25
    if total <= n:
        return True

    return False

def find(n):
    low = 1
    high = 10
    x = 0
    while low <= high:
        mid = (low+high)//2
        if check(mid,n):
            x = mid
            low = mid+1
        else:
            high = mid-1

    return x

def find2(n,x,curr_len):
    low = 0
    high = 26
    while low <= high:
        mid = (low+high)//2
        if mid*pow(26,x-curr_len-1) < n:
            low = mid+1
            k = mid
        else:
            high = mid-1

    return k

def main():
    n = int(input())
    if n <= 26:
        print(chr(ord('a')+n-1))
        return
    
    ans = ''
    x = find(n)
    n -= 26*(pow(26,x)-1)//25
    if n == 0:
        for i in range(x):
            ans += 'z'
    else:
        x += 1
        
        while len(ans) != x:
            k = find2(n,x,len(ans))
            if k == 0:
                ans += chr(ord('a')+k)
            else:
                ans += chr(ord('a')+k)
                n -= k*pow(26,x-len(ans))

            

    print(ans)
            
    
main()

Solution (Python):
import bisect, collections, copy, heapq, itertools, math, numpy, string
import sys
from bisect import bisect_left, bisect_right, insort
from collections import deque
def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int, sys.stdin.readline().rstrip().split())
def MS(): return map(str, sys.stdin.readline().rstrip().split())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())




n = I()
s = 1
if n < 27:
    print(chr(96 + n))

else:
    while 26 ** s < n:
        n -= 26 ** s
        s += 1
    ans = ''
    n -= 1
    for i in range(s):

        k = n // 26**(s-i-1)
        ans = ans + chr(97 + k)
        n = n - k * 26**(s-i-1)



    print(ans)

Solution (Python):
N = int(input())
L = list('abcdefghijklmnopqrstuvwxyz')
if N <= 26:
    print(L[N - 1])
    exit()

L = list('zabcdefghijklmnopqrstuvwxy')
ans_l = []


while (True):
    syou = N // 26
    amari = N % 26
    ans_l.append(L[amari])

    if amari == 0:
        N = syou - 1
    else:
        N = syou
    
    if N <= 26: break
    
if N == 26: N = 0
ans_l.append(L[N])

ans_l = ans_l[::-1]
print(*ans_l, sep="")

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

_SUBBASE = 26
subtra = 26
divCnt = 0

while True:
    if n <= subtra:
        break
    n -= subtra
    subtra = subtra * _SUBBASE
    divCnt += 1

n -= 1

anslist = []
for _ in range(divCnt+1):
    anslist.append(n%26)
    n = n//26

anslist.reverse()
for ac in anslist:
    print(chr(ord('a') + ac), end="")
print()

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

F=0
K=0

while F<N:
    F=(F*26)+26
    K+=1

N=N-F//26

S=""
for _ in range(K):
    S=chr(ord("a")+N%26)+S
    N//=26

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)

print(num2alpha(N).lower())

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


tmp = 0
digit = 1
tmp += pow(26, digit)
while N > tmp:
    digit += 1
    tmp += pow(26, digit)

order = N - (tmp - pow(26, digit)) - 1
X = [0] * digit
cur = digit - 1
while order > 0:
    X[cur] = order % 26
    order //= 26
    cur -= 1




a = ord('a')
ans = []
for x in X:
    c = chr(a + x)
    ans.append(c)

print(''.join(ans))

Solution (Python):
def _main(n):
    codes = "abcdefghijklmnopqrstuvwxyz"
    b = len(codes)
    values = ""
    while True:
        n -= 1
        values += codes[int(n % b)]
        n, mod = divmod(n, b)
        if n == 0:
            print(values[::-1])
            break


def _entry():
    n = int(input())
    _main(n)


if __name__ == "__main__":
    _entry()

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

for i in range(1000):
    if n > 26**(i+1):
        n -= 26**(i+1)
    else:
        break
x = i+1

t = 26**i
ans = ""
for i in range(x-1,-1,-1):
    t = 26**i
    for j in range(26):
        if n > t:
            n -= t
        else:
            ans += chr(ord("a")+j)
            break
print(ans)

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

    ans = ''
    while n > 0:
        t = n % 26
        t = 26 if t == 0 else t
        ans = chr(t + 96) + ans
        n = (n - 1) // 26
    print(ans)


if 'unittest' not in globals():
    resolve()

Solution (Python):
import string

N = int(input())

s = string.ascii_lowercase

n = N
l = []
append = l.append
while n != 0:
  a, b = (n - 1) // 26, n % 26
  append(s[b - 1])
  n = a

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

Solution (Python):
N = int(input().rstrip())
ret = []
while N != 0:
    char = chr(96 + (N % 26))
    if char == '`':
        char = 'z'
        N = N // 26 - 1
    else:
        N = N // 26
    ret.append(char)
print(''.join(ret[::-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())
ans = num2alpha(n).lower()
print(ans)

Solution (Python):
n = int(input())
l = [chr(h) for h in range(97,97+26)]
i = 1
j1 = 0
j2 = 0
s = ""
while 1:
  j1 = j2 + 1
  j2 += 26 ** i
  if j1 <= n <= j2:
    break
  i += 1
n -= j1
for k in range(i):
  n1 = int(n%26)
  s = l[n1] + s
  n = (n-n1) / 26
print(s)

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

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

print(conv(num))

Solution (Python):
n = int(input())
d = {k:v for k,v in zip(range(26),'abcdefghijklmnopqrstuvwxyz')}
i = 1
while n > 26**i:
    n -= 26**i
    i += 1
res = ''
n -= 1
for j in range(i-1,-1,-1):
    jn, n = divmod(n, 26**j)
    res += d[jn]
print(res)

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

def f(n):
    n = n-1
    m = 'abcdefghijklmnopqrstuvwxyz'
    ans = ''
    if n // 26 == 0:
        ans += m[(n%26)]
        return ans
    ans += m[(n%26)]
    return f(n//26) + ans

print(f(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())
a = N%26
next = int(N/26)
b = N%26
next = int(N/26)
a=[]
answer=[]
for i in range(20):
  if (N > 26) and (N%26)!=0:
    a.append(N%26)
    N = int(N/26)
  elif (N > 26) and (N%26)==0:
    a.append(26)
    N = int((N-1)/26)
  else:
    a.append(N)
    break
for i in range(len(a)):
  answer.append(chr(ord('a')+a[i]-1))
mojiretu = ' '
for x in reversed(answer):
    mojiretu += x
print(mojiretu)

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


def cal(n):
    c = ord("a")
    l = ""
    b = n
    while b > 26:
        a = (b-1) % 26
        b = (b-a)//26
        l = l+chr(c+a)
    l = l+chr(c+b-1)
    print(l[::-1])


cal(n)

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

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

i = 0
sum = 0
while True:
    if N <= sum:
        sum -= 26 ** i
        break
    i += 1
    sum += 26 ** i

s = Base_10_to_n(N - sum - 1, 26)
s = list(s.split())
ans = ""
for st in s:
    ans = ans + chr(int(st) + 97)
plusa = "a" * (i - len(ans))
ans = plusa + ans
print(ans)

Solution (Python):
N=int(input())
ans=''
t=1
while(N>0):
    s=N%26
    if s==0:
        s+=26
    ans+=chr(s+96)
    if s!=26:
        N//=26
    else:
        N-=1
        N//=26
    t+=1
print(ans[::-1])

Solution (Python):
n=int(input())
digit=0
for i in range(1,12):
    tmp=26**i
    if n<=tmp:
        digit=i
        break
    else:
        n-=tmp

n-=1
ans=[]
for i in range(digit-1,-1,-1):
    tmp=26**i
    
    ans.append(n//tmp)
    n%=tmp

for ai in ans:
    print(chr(ai+97),end='')

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

def num2alpha(num):
    if num<=26:
        return chr(96+num)
    elif num%26==0:
        return num2alpha(num//26-1)+'z'
    else:
        return num2alpha(num//26)+chr(96+num%26)
print(num2alpha(N))

Solution (Python):
_dog_no = int(input())
_letter = [chr(i) for i in range(97,97+26)]
_dog_name = ""
for _i in range(11):
  _dog_no -= 1
  _dog_name = _letter[_dog_no % 26] + _dog_name
  _dog_no = _dog_no // 26
  if _dog_no < 1:
    break
print(_dog_name)

Solution (Python):
import string
str_map = {num+1: item for num, item in enumerate(string.ascii_lowercase)}
def main():
	n = int(input())
	ans = []
	while n > 26:
		tmp = 26 if n%26 == 0 else n%26
		ans.append(str_map[tmp])
		n = (n-1) // 26
	ans.append(str_map[n])
	ans_str = ''.join(ans)
	print(ans_str[::-1])
	return

if __name__ == "__main__":
	main()

Solution (Python):
import sys
a=int(input())
c=0
i=0
if a==26:
  print("z")
  sys.exit()
if a==26+26**2:
  print("zz")
  sys.exit()
if a==26+26**2+26**3:
  print("zzz")
  sys.exit()
if a==26+26**2+26**3+26**4:
  print("zzzz")
  sys.exit()
if a==26+26**2+26**3+26**4+26**5:
  print("zzzzz")
  sys.exit()
if a==26+26**2+26**3+26**4+26**5+26**6:
  print("zzzzzz")
  sys.exit()
if a==26+26**2+26**3+26**4+26**5+26**6+26**7:
  print("zzzzzzz")
  sys.exit()
if a==26+26**2+26**3+26**4+26**5+26**6+26**7+26**8:
  print("zzzzzzzz")
  sys.exit()
if a==26+26**2+26**3+26**4+26**5+26**6+26**7+26**8+26**9:
  print("zzzzzzzzz")
  sys.exit()
if a==26+26**2+26**3+26**4+26**5+26**6+26**7+26**8+26**9+26**10:
  print("zzzzzzzzzz")
  sys.exit()
while c<=a:
  i+=1
  c+=26**i
l=[0]*i
p=0
for k in range(i):
  p+=26**k
a-=p
for j in range(i):
  l[j]=a//(26**(i-j-1))
  a=a%(26**(i-j-1))
for n in l:
  print(chr(n+97),end='')

Solution (Python):
from string import ascii_lowercase as lower
lower = list(lower)
n = int(input())
digit = 0
num = 0
while num < n:
    digit += 1
    num += 26**digit

num -= 26**digit
ans = [None]*digit
length = digit
while digit > 0 and num != n:
    for idx in range(26):
        new = num + 26**(digit-1)
        if new >= n:
            break

        else:
            num = new
    ans[length-digit] = lower[idx]
    digit -= 1

ans = [a if a is not None else 'a' for a in ans]
print(''.join(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)


X = num2alpha(n)
print(X.swapcase())

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

ans = ''

while(1):
    a = (N-1) % 26
    ans += chr(97+a)

    N = (N - 1) // 26

    if N < 1:
        break

print(ans[::-1])

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

div = 26
ans = []

while 1:
    if N % 26 == 0:
        ans.append(26)
        N = N // div - 1
    else:
        amari = N % div
        ans.append(amari)
        N //= div
    if N == 0:
        break

ans.reverse()
name = []

for i in ans:
    name.append(chr(i+96))

print(''.join(name))

Solution (Python):

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


def main():
    n = int(input())
    k = []
    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']

    n -= 1
    while True:
        if n < 0:
            break
        _ = n % 26
        k.append(alpha[_])
        n = (n - _) // 26 - 1

    k.reverse()
    for i in k:
        print(i, end='')
    print('')


if __name__ == "__main__":
    main()

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

n = 26
m = 1

while N > n:
    n = n * 26 + 26
    m += 1

e = n
result = ''

for i in range(m):
    a = N % 26
    if a == 0:
        a = 26
    result = chr(a + 96) + result
    N = (N - a) // 26

print(result)