Problem:
 Score : 300 points    Problem Statement 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001 , but he gave them new names, as follows:   the dogs numbered 1,2,\cdots,26 were respectively given the names a , b , ..., z ;  the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names aa , ab , ac , ..., zy , zz ;  the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names aaa , aab , aac , ..., zzy , zzz ;  the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names aaaa , aaab , aaac , ..., zzzy , zzzz ;  the dogs numbered 475255,475256,\cdots were respectively given the names aaaaa , aaaab , ...;  and so on.   To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names:  a , b , ..., z , aa , ab , ..., az , ba , bb , ..., bz , ..., za , zb , ..., zz , aaa , aab , ..., aaz , aba , abb , ..., abz , ..., zzz , aaaa , ...  Now, Roger asks you:  "What is the name for the dog numbered N ?"      Constraints  N is an integer.  1 \leq N \leq 1000000000000001         Input Input is given from Standard Input in the following format:  N       Output Print the answer to Roger's question as a string consisting of lowercase English letters.        Sample Input 1 2      Sample Output 1 b       Sample Input 2 27      Sample Output 2 aa       Sample Input 3 123456789      Sample Output 3 jjddja

Solution (Python):
n = int(input())
t = 0
a = 0
while a < n:
    t += 1
    a += 26 ** t
n -= a // 26
ans = ''
for _ in range(t):
    ans += chr(n % 26 + 97)
    n //= 26
print(ans[::-1])

Solution (Python):
import sys

stdin = sys.stdin


def ni(): return int(ns())


def na(): return list(map(int, stdin.readline().split()))


def naa(N): return [na() for _ in range(N)]


def ns(): return stdin.readline().rstrip()  


N = ni()

digit = 1

alphabets = "abcdefghijklmnopqrstuvwxyz"
ans = ""

while(1):
    if N > pow(26, digit):
        N -= pow(26, digit)
        digit += 1
        continue
    N -= 1
    for j in range(digit):
        ans += alphabets[N // pow(26, digit - j - 1)]
        N = N % pow(26, digit - j - 1)
    break
print(ans)

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

Solution (Python):

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

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


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


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


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


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


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


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


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


sys.setrecursionlimit(1000000)
mod = 1000000007


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)
    i = I()
    print(num2alpha(i).lower())
    return


if __name__ == "__main__":
    solve()

Solution (Python):
N = int(input())
string = ""
while N > 0:
    N, remainder = divmod(N - 1, 26)
    string = chr(65 + remainder) + string
print(string.lower())

Solution (Python):
n = int(input()) - 1
k = 1
while n >= 26 ** k:
    n -= 26 ** k
    k += 1
ans = []
for d in range(k):
    n, r = divmod(n, 26)
    ans.append(chr(97 + r))
print(''.join(reversed(ans)))

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

Solution (Python):
N = int(input())
string = ""
while N > 0:
    N, remainder = divmod(N - 1, 26)
    string = chr(65 + remainder) + string
print(string.lower())

Solution (Python):
A = 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(int(A))
print(ans.lower())

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

print(num2alpha(n).lower())

Solution (Python):
def num2alpha(num):
    if num<=26:
        return chr(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())
def num2alpha(num):
    if num<=26:
        return chr(96+num)
    elif num%26==0:
        return num2alpha(num//26-1)+chr(122)
    else:
        return num2alpha(num//26)+chr(96+num%26)
print(num2alpha(N))

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 6)
input = sys.stdin.readline
from math import floor, sqrt, factorial, hypot, log  
from heapq import heappop, heappush, heappushpop
from collections import Counter, defaultdict, deque
from itertools import accumulate, permutations, combinations, product, combinations_with_replacement
from bisect import bisect_left, bisect_right
from copy import deepcopy
from fractions import gcd
from random import randint


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


inf = float('inf')
mod = 10 ** 9 + 7


def pprint(*A):
    for a in A:     print(*a, sep='\n')


def INT_(n): return int(n) - 1


def MI(): return map(int, input().split())


def MF(): return map(float, input().split())


def MI_(): return map(INT_, input().split())


def LI(): return list(MI())


def LI_(): return [int(x) - 1 for x in input().split()]


def LF(): return list(MF())


def LIN(n: int): return [I() for _ in range(n)]


def LLIN(n: int): return [LI() for _ in range(n)]


def LLIN_(n: int): return [LI_() for _ in range(n)]


def LLI(): return [list(map(int, l.split())) for l in input()]


def I(): return int(input())


def F(): return float(input())


def ST(): return input().replace('\n', '')


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


if __name__ == '__main__':
    main()

Solution (Python):
s="abcdefghijklmnopqrstuvwxyz"
l=1
n=int(input())-1
while n>=26**l:
  n-=26**l
  l+=1
li=[]
while n:
  li=[n%26]+li
  n=n//26
r=""
for i in li:
  r+=s[i]
while len(r)!=l:
  r="a"+r
print(r)

Solution (Python):
N = int(input())
alphabet = [
    "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"]
out = []
div = 28


while True:
    N, mod = divmod(N, 26)
    if mod == 0:
        N -= 1
    out.append(alphabet[mod])
    if N == 0:
        break
print("".join(reversed(out)))

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

Solution (Python):



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

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

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

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

print(num2alpha(N).lower())

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

n = int(input())

print(num2alpha(n).lower())

Solution (Python):
from string import ascii_lowercase
N = int(input())
ans = []
while N > 0:
    div, mod = divmod(N-1, 26)
    N = div
    ans.append(ascii_lowercase[mod])
ans.reverse()
print(''.join(ans))

Solution (Python):
def num2alpha(num: int):
    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):

from __future__ import division, print_function

import os
import sys
import string
from io import BytesIO, IOBase

if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip


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

    sol = []

    while n != -1:
        sol.append(string.ascii_lowercase[n % 26])
        n //= 26
        n -= 1

    print(*sol[::-1], sep='')




BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

input = lambda: sys.stdin.readline().rstrip("\r\n")



if __name__ == "__main__":
    main()

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

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

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

Solution (Python):
n = int(input())
n -= 1
ans = []
while True:
    
    ans.append(chr(ord('a') + n % 26))
    n //= 26
    if n == 0:
        break
    else:
        n -= 1
ans = ans[::-1]
ans = ''.join(ans)
print(ans)

Solution (Python):
N = int(input())
res = []
abc = "abcdefghijklmnopqrstuvwxyz"
alpha = 26

while N > 0:
    res.append(abc[N%alpha-1])
    N = (N-1)//alpha

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

Solution (Python):


N = int(input())
S = ''
list_chr = [chr(i) for i in range(ord('a'), ord('z')+1)]

while True:
  N -= 1
  S = list_chr[N%26] + S
  N = N//26
  if N==0:
    break

print(S)

Solution (Python):
import sys
sys.setrecursionlimit(10**7) 
import math
from copy import copy, deepcopy
from copy import deepcopy as dcp
from operator import itemgetter
from bisect import bisect_left, bisect, bisect_right

from collections import deque


from collections import Counter

from itertools import accumulate,combinations,permutations

from heapq import heapify,heappop,heappush


from functools import lru_cache

from decimal import Decimal

def input(): 
    x=sys.stdin.readline()
    return x[:-1] if x[-1]=="\n" else x
def printl(li): _=print(*li, sep="\n") if li else None
def argsort(s, return_sorted=False): 
    inds=sorted(range(len(s)), key=lambda k: s[k])
    if return_sorted: return inds, [s[i] for i in inds]
    return inds
def alp2num(c,cap=False): return ord(c)-97 if not cap else ord(c)-65
def num2alp(i,cap=False): return chr(i+97) if not cap else chr(i+65)
def matmat(A,B):
    K,N,M=len(B),len(A),len(B[0])
    return [[sum([(A[i][k]*B[k][j]) for k in range(K)]) for j in range(M)] for i in range(N)]
def matvec(M,v):
    N,size=len(v),len(M)
    return [sum([M[i][j]*v[j] for j in range(N)]) for i in range(size)]
def T(M):
    n,m=len(M),len(M[0])
    return [[M[j][i] for j in range(n)] for i in range(m)]
def main():
    mod = 1000000007
    

    N = int(input())
    
    
    
    
    N-=1
    ans=""
    while N>=0:
        
        N,d=divmod(N,26)
        N-=1
        ans=num2alp(d)+ans
    print(ans)


    

if __name__ == "__main__":
    main()

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

Solution (Python):
import sys

sys.setrecursionlimit(1000000)

import bisect
import math
import collections
import heapq


def solve(N):
    ans = []
    while N > 26:
        k = N % 26
        N //= 26
        if k != 0:
            ans.append(chr(ord('a') + k - 1))
        else:
            ans.append('z')
            N -= 1

    ans.append(chr(ord('a') + N - 1))
    return "".join(ans[::-1])













if __name__ == "__main__":
    S = int(input())
    print(solve(S))

Solution (Python):
n = int(input())
total = 0
for name_len in range(1,12+1):
    if total+26**name_len >= n:
        n -= total
        break
    else:
        total += 26**name_len
n -= 1
digits = []
for i in range(name_len):
    digits.append(chr(ord('a')+n%26))
    n //= 26
digits.reverse()
print(''.join(digits))

Solution (Python):
import itertools
import decimal
import math
import collections
import sys
input = 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)

N=int(input())

ans=num2alpha(N)


print(ans.lower())

Solution (Python):


def divmod2(n, d):
    a, b = divmod(n, d)
    if b == 0:
        return a-1, d
    return a,b

def base(n):
    ret = []
    while n > 0:
        n, d = divmod2(n, 26)
        ret += [chr(ord('a') + d - 1)]
    return ''.join(ret[::-1])

N = int(input())

print(base(N))

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

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

Solution (Python):
import sys

import math








input = sys.stdin.readline

getS = lambda: input().strip()
getN = lambda: int(input())
getList = lambda: list(map(int, input().split()))
getZList = lambda: [int(x) - 1 for x in input().split()]

INF = 10 ** 20
MOD = 998244353

def solve():
    n = getN()
    
    n -= 1
    ref = [chr(ord("a") + i) for i in range(26)]
    ans = []
    while(n >= 0):
        idx = (n) % 26
        ans.append(ref[idx])
        n = (n // 26) - 1

    ans.reverse()
    print("".join(ans))
def main():
    n = getN()
    for _ in range(n):
        solve()


if __name__ == "__main__":
    
    solve()

Solution (Python):
def solve(n):
    alphabet = "abcdefghijklmnopqrstuvwxyz"
    s_list = []
    m = n
    while m > 0:
        m = m - 1
        s_list.append(alphabet[m % 26])
        m = m // 26
    return "".join(reversed(s_list))


def main():
    n = int(input())
    res = solve(n)
    print(res)


def test():
    assert solve(2) == "b"
    assert solve(27) == "aa"
    assert solve(123456789) == "jjddja"


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

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

Solution (Python):
N = int(input())
ans = []
while N!=0 :
    ans.append( chr( ( (N-1) %26)+ord('a') ))
    N = (N-1)//26
print("".join(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)
n = int(input())
ans = num2alpha(n)
print(ans.lower())

Solution (Python):
import sys 
input = lambda:sys.stdin.readline().strip()
n = int(input())
n-=1
ans = ""
while n>=0:
    ans+=chr(ord('a')+n%26)
    n = n//26
    n-=1
print(ans[::-1])

Solution (Python):
n=int(input())
num=[]
ans=""
for i in range(1000):
    if n%26!=0:
        num.append(n%26)
        n=n//26
    else:
        num.append(26)
        n=n//26-1
    if n==0:
        break
for i in range(len(num)):
    num1=96+num[-1-i]
    ans+=chr(num1)
print(ans)

Solution (Python):
def main():
    N = int(input())
    s = ''
    while N:
        N -= 1
        s += chr(ord('a') + N % 26)
        N //= 26
    return ''.join(s[::-1])

print(main())

Solution (Python):
n=int(input())
l=[]
while n>0:
  l.append(chr(97+(n-1)%26))
  n-=1
  n//=26
print(''.join(l[::-1]))

Solution (Python):





import sys
import heapq

def main():
    n = int(input())
    ans = ""
    alphabet = "abcdefghijklmnopqrstuvwxyz"
    while n > 0:
        ans = alphabet[(n - 1) % 26] + ans
        n = (n - 1) // 26
    print(ans)
    return

if __name__ == "__main__":
    main()

Solution (Python):
import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
from math import *
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction

sys.setrecursionlimit(int(pow(10,6)))


mod = int(pow(10, 9) + 7)
mod2 = 998244353
def data(): return sys.stdin.readline().strip()
def out(*var, end="\n"): sys.stdout.write(' '.join(map(str, var))+end)
def l(): return list(sp())
def sl(): return list(ssp())
def sp(): return map(int, data().split())
def ssp(): return map(str, data().split())
def l1d(n, val=0): return [val for i in range(n)]
def l2d(n, m, val=0): return [l1d(n, val) for j in range(m)]


def printString(n): 
  
    
    string = ["\0"] * 50
  
    
    i = 0
  
    while n > 0: 
        
        rem = n % 26
  
        
        
        if rem == 0: 
            string[i] = 'z'
            i += 1
            n = (n // 26) - 1
        else: 
            string[i] = chr((rem - 1) + ord('a')) 
            i += 1
            n = n // 26
    string[i] = '\0'
    ans=[]
    for ele in string:
        if ele.isalpha():
            ans.append(ele)
    string=ans
    
    string = string[::-1] 
    print( "".join(string)) 
n=l()[0]
printString(n)

Solution (Python):
def examA():
    S = SI()
    if S in alphabet:
        ans = "a"
    else:
        ans = "A"
    print(ans)
    return

def examB():
    N, K = LI()
    P = LI()
    P.sort()
    ans = sum(P[:K])
    print(ans)
    return

def examC():
    N = I()
    ans = ""
    while(N>0):
        N -= 1
        ans += alphabet[N%26]
        N //= 26
        if N==0:
            break
    print(ans[::-1])
    return

def examD():
    N = I()
    A = LI()
    q = I()

    ans = 0
    print(ans)
    return

def examE():
    ans = 0
    print(ans)
    return

def examF():
    ans = 0
    print(ans)
    return

from decimal import getcontext,Decimal as dec
import sys,bisect,itertools,heapq,math,random
from copy import deepcopy
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
def I(): return int(input())
def LI(): return list(map(int,sys.stdin.readline().split()))
def DI(): return dec(input())
def LDI(): return list(map(dec,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
global mod,mod2,inf,alphabet,_ep
mod = 10**9 + 7
mod2 = 998244353
inf = 10**18
_ep = dec("0.000000000001")
alphabet = [chr(ord('a') + i) for i in range(26)]
alphabet_convert = {chr(ord('a') + i): i for i in range(26)}

getcontext().prec = 28

sys.setrecursionlimit(10**7)

if __name__ == '__main__':
    examC()

"""
142
12 9 1445 0 1
asd dfg hj o o
aidn
"""

Solution (Python):
N = int(input())
ans = ''
nowN = N
while nowN != 0:
    nowN -= 1
    now = nowN % 26
    ans = chr(now + 97) + ans
    nowN //= 26
print(ans)

Solution (Python):
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")



n = int(input())
l = [chr(v) for v in range(ord("a"), ord("z")+1)]

ans = []
while n>0:
    n -= 1
    i,j = n//26, n%26
    ans.append(l[j])
    n = i

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

Solution (Python):
from string import ascii_lowercase
n = int(input())
q = n
s = []
while q > 0:
    q -= 1
    q, r = divmod(q, 26)
    s = [ascii_lowercase[r]] + s
print(*s, sep='')

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

for l in range(1,15):
    if n >= 26 ** l:
        n -= 26 ** l
        continue

    ans = ""
    for i in range(l):
        d = n % 26
        ans += chr(d + ord('a'))
        n //= 26
    ans = ans[::-1]
    break

print(ans)

Solution (Python):
def main():
    from string import ascii_lowercase
    dic = {i+1: a for i, a in enumerate(ascii_lowercase)}
    rdic = {a: i+1 for i, a in enumerate(ascii_lowercase)}
    N = int(input())

    def dfs(s, N):
        if N <= 0:
            return s
        v = N % 26
        if v == 0:
            v = 26
        N -= v
        N //= 26
        S = dfs(s+dic[v], N)
        return S
    ans = dfs('', N)[::-1]
    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
def main():
    n = int(input())
    
    alpha = "abcdefghijklmnopqrstuvwxyz"

    ans = []
    while n!= 0:
        n-=1
        i = n%26
        ans.append(alpha[i])
        n//=26

    print("".join(ans[::-1]))
if __name__ == "__main__":
    main()

Solution (Python):
def main():

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

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

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

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

print(num2alpha(N).lower())

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

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

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

Solution (Python):
from string import ascii_lowercase as abc
n = int(input())
a = {i + 1: s for i, s in enumerate(abc)}
ans = ''
while n >= 1:
    n, r = divmod(n, 26)
    if r == 0:
        r = 26
        n -= 1
    
    ans += a[r]
print(ans[::-1])

Solution (Python):
import sys
from collections import defaultdict, Counter, namedtuple, deque
import itertools
import functools
import bisect
import heapq
import math


MOD = 10 ** 9 + 7



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

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

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

print(num2alpha(N).lower())

Solution (Python):
def main():
    N = int(input())
    r = ''
    while N > 0:
        if N%26 == 0:
            r = 'z' + r
        else:
            r = chr(ord('a') + (N%26) - 1) + r
        N = (N-1)//26
    return r
print(main())

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

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

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

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

import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N = ir()
num = 26
answer = ''
while N:
    N -= 1
    remain = N%num
    answer += chr(remain+ord('a'))
    N //= num

print(answer[::-1])

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

    t = 1

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

    ans = ans[::-1]

    print(ans)


if __name__ == '__main__':
    main()

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

Solution (Python):
N = int(input())
res = []
ls = 'abcdefghijklmnopqrstuvwxyz'
while N>0:
    tmp = (N-1)%26
    N = (N-1)//26
    res.append(ls[tmp])
res = res[::-1]
print(''.join(res))

Solution (Python):
def printString(n):
    letters = "abcdefghijklmnopqrstuvwxyz"
    result = ""
    while n:
        result = letters[(n - 1) % 26] + result
        n = (n - 1) // 26
    return result
n = int(input())
print(printString(n))

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

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd
from itertools import accumulate, permutations, combinations, product, groupby, combinations_with_replacement
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from heapq import heappush, heappop
from functools import reduce
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()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
ans = []

while N != 0:
    N -= 1
    p, r = divmod(N, 26)
    ans.append(ascii_lowercase[r])
    N = p

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

Solution (Python):
N = int(input())
k = 1
while 26**k <= N:
    N -= 26**k
    k += 1

def itoc(i):
    return chr(ord('a') + i)

N -= 1
ans = ''
for _ in range(k):
    N,i = divmod(N,26)
    ans += itoc(i)

if all(c=='z' for c in ans):
    print(ans[:-1])
else:
    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)


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

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

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

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

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

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


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


print(num2alpha(n).lower())

Solution (Python):
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())
i = 1
while pow(26,i) < n:
    n -= pow(26,i)
    i += 1
ans = ''
n -= 1
for _ in range(i):
    ans += chr(ord('a') + n%26)
    n //= 26
print(ans[::-1])

Solution (Python):
n = int(input()) - 1
A = [chr(i) for i in range(ord("a"),ord("z")+1)]

m = 26
s = 0
g = 1
while s+m <= n:
    s += m
    m *= 26
    g += 1


n -= s


ANS = []
for i in range(g):
    ANS.append(A[n%26])
    n//=26
print("".join(ANS[::-1]))

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

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

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

N = int(input())

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

P = 26
t = 1
L = 1
while t + P <= N:
    t += P
    L += 1
    P *= 26

seq = N - t
ans = []
for l in range(L):
    ans.append(Alp[seq % 26])
    seq //= 26

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

Solution (Python):
n = int(input())
alp = "abcdefghijklmnopqrstuvwxyz"
name = ""
while n > 0:
    name += alp[n%26-1]
    n = (n-1)//26
print(name[::-1])

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

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

alpha = "abcdefghijklmnopqrstuvwxyz"

a = 1
for i in range(1,10000):
    a *= 26
    if N < a:
        NN = N
        o = [0]*i
        for j in range(i):
            o[j] = NN % 26
            NN //= 26
        print(''.join([alpha[x] for x in o[::-1]]))
        exit()
    else:
        N -= a