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):
def encode(x):
    return chr(x + 97)


N = int(input()) - 1
ans = []
while True:
    q, r = divmod(N, 26)
    ans.append(r)
    if q == 0:
        break
    N //= 26
    N -= 1
print("".join(map(encode, ans[::-1])))

Solution (Python):
n = int(input())
l = []
n -= 1
while True:
    l.append(n % 26)
    if n <= 25:
        break
    n //= 26
    n -= 1
l.reverse()
ans = ""
for i in range(len(l)):
    ans += chr(97 + l[i])
print(ans)

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

Solution (Python):
def main():
    N = int(input())
    ANS = []
    while N > 0:
        if N%26==0:
            ANS.insert(0,'z')
            N = N//26 -1
        else:
            ANS.insert(0,chr(N%26+96))
            N = N//26
    print(''.join(ANS))


if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
alp = [chr(i) for i in range(97,97+26)]
ans = ''
while N>0:
    B = N%26-1
    ans += alp[B]
    N //=26
    if B == -1:
        N -=1
print(''.join(ans[::-1]))

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

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

print(num2alpha(n).lower())

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

len = 1
cnt = 0
while cnt + pow(26, len) < N:
    cnt += pow(26, len)
    len += 1

for i in range(len):
    N -= pow(26, i)

ans = ""
for i in range(len-1, -1, -1):
    ans += chr(N//pow(26, i)+97)
    N %= pow(26, i)
print(ans)

Solution (Python):
n = int(input())
abc = 'abcdefghijklmnopqrstuvwxyz'
ans = []
n -= 1
while n >= 0:
    ans.append(abc[n%26])
    n //= 26
    n -= 1

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

Solution (Python):
alphabets = [""] + [s for s in "abcdefghijklmnopqrstuvwxyz"]

s = int(input())

nums = []

while s > 0:
  nums.append((s - 1) % 26 + 1)
  s = (s - 1) // 26

res = ""
  
for _ in range(len(nums)):
  res = res + alphabets[nums.pop()]

print(res)

Solution (Python):









def solve():
    N = int(input())
    v = N

    ans = ''

    while v > 0:
        d, m = divmod(v, 26)
        if m == 0:
            d -= 1
            m = 26
        ans = chr(m + 96) + ans
        v = d

    return ans


def main():
    print(solve())


if __name__ == "__main__":
    main()

Solution (Python):
N=int(input())
str=''
while True:
  N-=1
  str=chr(N%26+ord('a'))+str
  N//=26
  if N<=0:break
print(str)

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

def solve(n):
    if 1 <= n <= 26:
        return chr(ord('a') + (n-1) % 26)
    else:
        q, r = divmod(n, 26)
        if r == 0:
            q -= 1
            r += 26
        return solve(q) + chr(ord('a') + (r-1) % 26)

print(solve(N))

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

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

lis = []
n-=1
for j in range(i-1,-1, -1):
    a = n//(26**j)
    lis.append(alpha[a])
    n = n%(26**j)

print("".join(lis))

Solution (Python):
import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)
INF = float('inf')

N = int(input())
komoji = [chr(i) for i in range(97, 97+26)]

ans = ""

while True:
    q, mod = divmod(N, 26)
    ans = komoji[mod-1] + ans
    
    if mod == 0:
        q = q - 1
    N = q
    if q == 0:
        break
print(ans)

Solution (Python):
n = int(input())
ans = ''
while True:
    n, mod = (n - 1) // 26, (n - 1) % 26
    ans += chr(97 + mod)
    if n == 0: break
print(ans[::-1])

Solution (Python):
def main():
    from sys import setrecursionlimit, stdin, stderr
    from os import environ
    from collections import defaultdict, deque, Counter
    from math import ceil, floor
    from itertools import accumulate, combinations, combinations_with_replacement
    setrecursionlimit(10**6)
    dbg = (lambda *something: stderr.write("\033[92m{}\033[0m".format(str(something)+'\n'))) if 'TERM_PROGRAM' in environ else lambda *x: 0
    input = lambda: stdin.readline().rstrip()
    LMIIS = lambda: list(map(int,input().split()))
    II = lambda: int(input())
    P = 10**9+7
    INF = 10**18+10

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

    
    
    
    
    
    
        

    
main()

Solution (Python):
n = int(input())
ans = ''
while True:
  t = n%26
  if t == 0:
    ans += 'z'
    n -= 26
  else:
    ans += chr(96+t)
    n -= t
  if n <= 0:
    break
  n //= 26
    
print(ans[::-1])

Solution (Python):


N, = map(int, input().split())
lower = 'abcdefghijklmnopqrstuvwxyz'

ans = ''
while True:
    a = N % 26
    ans = lower[a-1] + ans
    if a==0:
        N = (N-1) // 26
    else:
        N = N // 26
    if N==0 :
        break

print(ans)

Solution (Python):
n = int(input())
a = "abcdefghijklmnopqrstuvwxyz"
now = 0
tnp = 0
for i in range(1,1000):
    x = now + 26**i
    if (n<=x):
        tnp = i
        break
    now = x
x = n - now
ans = ""
for i in range(i):
    
    if i==0:
        ans = a[x%26-1] + ans
    else:
        ans = a[x%26-1] + ans
    x = (x-1) // 26
    x += 1
print(ans)

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

chr_start = 95
base = 26
digits = []

for i in range(13):
    res = n % base
    if res == 0:
        res = 26
    n = (n-res) // base
    digits.append(res+1)
    if n ==0:
        break
        
ans = "".join(reversed([chr(chr_start+d) for d in digits if d > 0]))
print(ans)

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

def alpha2num(alpha):
    num=0
    for index, item in enumerate(list(alpha)):
        num += pow(26,len(alpha)-index-1)*(ord(item)-ord('A')+1)
    return num
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())
    num = num2alpha(N)
    ans = num.lower()
    print(ans)

if __name__ == '__main__':
    main()

Solution (Python):
import string


N = int(input()) - 1
strs= [string.ascii_lowercase[N % 26]]

while(N >= 26):
    N //= 26
    N -= 1
    strs.append(string.ascii_lowercase[N % 26])

for s in strs[::-1]:
    print(s, end='')
print()

Solution (Python):


def read_int():
    return int(input().strip())


def read_ints():
    return list(map(int, input().strip().split(' ')))


def solve():
    alphas = 'abcdefghijklmnopqrstuvwxyz'
    N = read_int()
    answer = []
    while N != 0:
        d = (N%26-1)%26
        answer.append(alphas[d])
        N = (N-1)//26
    return ''.join(reversed(answer))


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

Solution (Python):
n = int(input())
s = "abcdefghijklmnopqrstuvwxyz"
ans = []

t = 1

while n > 26:
    tmp = n % 26
    if tmp == 0:
        tmp = 26
        n //= 26
        n -= 1
        ans.append(tmp)
        continue
    ans.append(tmp)
    n //= 26

ans.append(n)

for i in ans[::-1]:
    print(s[i-1], end="")

Solution (Python):
def resolve():
    n=int(input())
    a=list('abcdefghijklmnopqrstuvwxyz')
    ans=[]
    while n>0:
        n-=1
        ans.append(a[n%26])
        n//=26
    print(''.join(map(str,ans[::-1])))

if __name__ == '__main__':
    resolve()

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())
z=""
while n>0:
   n -= 1
   z += chr(n%26 +ord('a'))
   n//=26
print(z[::-1])

Solution (Python):
import sys

N_MAX = 200000 + 5
INF = 10**9 + 7
sys.setrecursionlimit(N_MAX)
MOD = 10**9 + 7

N = int(sys.stdin.readline())

alp = "zabcdefghijklmnopqrstuvwxy"


def name(A, s=""):
    i = A % 26
    z = alp[i]
    s = z + s

    A = A // 26
    if i == 0:
        A -= 1
    if A > 0:
        s = name(A, s)
    return s


print(name(N))

Solution (Python):
import sys
sys.setrecursionlimit(10**6)

n = int(input())

d = {(i-97+1):chr(i) for i in range(97,97+26)}
d[0] = 'z'

l = []

while n > 0:
    tmp = n%26
    l.append(tmp)
    if tmp == 0:
        n = n//26-1
    else:
        n //= 26

ans = ''

for i in l[::-1]:
    ans += d[i]
    
print(ans)

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)
x=num2alpha(num)
print(x.lower())

Solution (Python):
N = int(input())
alpha = []
while N != 0:
    a = N % 26
    if a == 0:
        a = 26
        N -= 1
    alpha.append(chr(a + 96))
    N = int(N / 26)
alpha.reverse()
print(''.join(alpha))

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):
def name(n):
    if v := (n-1)//26:
        return name(v) + chr((n-1)%26+97)
    return chr((n-1)%26+97)

n = int(input())
print(name(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):
import string

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

l = 0
ts = 0

while n > ts:
  l += 1
  ts += 26 ** l

for i in range(l):
  n -= 26 ** i

ans = ""
for i in range(l):
  ans += alpha[(n // (26 ** (l - 1 - i))) % 26]

print(ans)

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):
def main():
    n = int(input())
    s = "abcdefghijklmnopqrstuvwxyz"
    ans = ""
    while True:
        d = n % 26
        ans += s[d - 1]
        if n <= 26:
            break
        n = (n // 26)
        if d == 0:
            n -= 1
    print(ans[::-1])

if __name__ == '__main__':
    main()

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

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

    ans = []
    while N != 0:
        q, r = divmod(N, 26)
        if r == 0:
            ans.append(26)
            q -= 1
        else:
            ans.append(r)
        N = q
    ans = [chr(ord('a') + a - 1) for a in ans]
    return ''.join(reversed(ans))

print(c_one_quadrillion_and_one_dalmatians())

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


n = int(input())
print(str(henkan(n)).lower())

Solution (Python):
MAX_VAL = 1000000000000001
alp = 'abcdefghijklmnopqrstuvwxyz'
N = int(input())

sum = 0
factor = 0
while sum < MAX_VAL:
    if sum <= N < sum + 26 ** factor:
        break
    sum += 26 ** factor
    factor += 1

N -= sum

ans = ''
while factor > 0:
    idx = N // (26 ** (factor-1))
    ans += alp[idx]
    N -= idx * 26 ** (factor - 1)
    factor -= 1

    

print(ans)

Solution (Python):
def main():
    N = int(input())-1
    ans = ""
    while N >= 26:
        ans += chr(97+(N%26))
        N //= 26
        N -= 1
    ans += chr(97+(N%26))
    print("".join(list(reversed(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)
      
ans = num2alpha(N)      
      
print(str.lower(ans))

Solution (Python):
n = int(input())
result = ""
while n > 0:
    x = n%26
    if x==0:
        result = result+"z"
        n -= 26
    else:
        result = result + chr(96+x)
    n -= x
    n //= 26
print(result[::-1])

Solution (Python):


N = int(input())


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



ans = num_to_alpha(N)


print(ans)

Solution (Python):


def main():
    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())


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

Solution (Python):
n = int(input())
n -= 1
ans = []
for i in range(100):
  if n >= 26:
    n -= 26
    ans.append(chr(n%26+97))
    n //= 26
ans.append(chr(n+97))
ans = ans[::-1]
print(*ans,sep="")

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

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

print(ans)

Solution (Python):
def resolve():
    import sys
    sys.setrecursionlimit(10 ** 6)  
    to_index = lambda x: int(x) - 1  
    print_list_in_2D = lambda x: print(*x, sep="\n")  

    
    def input_int(): return int(input())

    def map_int_input(): return map(int, input())

    MII = map_int_input

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

    def MII_to_index(): return map(to_index, input())

    def MII_split_to_index(): return map(to_index, input().split())

    
    def list_int_inputs(): return list(map(int, input()))

    LII = list_int_inputs

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

    
    def LII_2D(rows_number): return [LII() for _ in range(rows_number)]

    def LII_split_2D(rows_number): return [LII_split() for _ in range(rows_number)]

    import string
    N = input_int()
    characters = string.ascii_letters

    def base_cvt(value, n=26):
        try:
            tmp = int(value)
        except:
            raise ValueError('Invalid value:', value)

        if n < 2 or n > len(characters):
            raise ValueError('Invalid n:', value)

        result = ''
        tmp = int(value)
        while tmp >= n:
            idx = tmp % n
            result = characters[idx] + result
            tmp = int(tmp / n)
            tmp-=1

        idx = tmp % n
        result = characters[idx] + result
        return result
    print(base_cvt(N-1))
    
resolve()

Solution (Python):
import sys
sys.setrecursionlimit(10**8)
input = sys.stdin.readline
N = int(input())

def num2alpha(n):
    ret = chr(n+ord('a')-1)
    if n==0:
        ret = 'z'
    return ret

ans = ['']
while N>0:
    t = N%26
    ans.append(num2alpha(t))
    N //= 26
    if t==0:
        N -= 1
ans.reverse()
ans = ''.join(ans)
print(ans)

Solution (Python):
n = int(input())
s = ""
while n > 0:
  rem = n % 26
  if rem == 0:
    rem = 26
  s += chr(96+rem)
  n //= 26
  if rem == 26:
    n -= 1
s = s[::-1]
print(s)

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

def char(x):
    return chr(x + 97)

lap = 1
m = 26
while n > m:
    n -= m
    lap += 1
    m *= 26

n -= 1
ans = ''
for _ in range(lap):
    ans = char(n % 26) + ans
    n //= 26

print(ans)

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

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

Solution (Python):
N = int(input())
al = "abcdefghijklmnopqrstuvwxyz"
name = ""
for i in range(1,12):
    b = N%26
    if b == 0:
        b = 26
    name = al[b-1] + name
    N -= b
    if N == 0:
        print(name)
        exit()
    N //= 26

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

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

print(ans)

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

buff = []
k = N
k -= 1
while True:
    k, r = divmod(k, 26)
    buff.append(r)
    if k == 0:
        break
    k -= 1

import string

print(''.join(string.ascii_lowercase[i] for i in buff[::-1]))

Solution (Python):
def resolve():
    import sys
    input = sys.stdin.readline
    
    n = int(input())
    
    
    
    
    
    
    
    

    import sys
    import math

    ALPHABET = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U",
                "V", "W", "X", "Y", "Z"]
    result = []

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

    res = alphabet_decimal(n)

    print(res.lower())

resolve()

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())
ans = []
alphabets = [chr(ord('a') + x) for x in range(26)]

while N > 0:
    ans.append(alphabets[N % 26-1])
    N = (N-1)//26

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

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

for i in temp_list[::-1]:
    print(chr(97 + i), end="")
print()

Solution (Python):
N = int(input())
a = (N-1)//26
b = N%26
ans = ''
while a!=0:
  if b==0:
    b = 26
  ans = chr(b+96) + ans
  b = a%26
  a = (a-1)//26

if b==0:
  b=26
ans = chr(b+96) + ans
print(ans)

Solution (Python):
import numpy as np
N=int(input())
N-=1
s ='abcdefghijklmnopqrstuvwxyz'
b = []
while True:
    a = N % 26
    b.append(s[a])
    N = N // 26
    if N == 0:
        break
    N -= 1
for i in range(len(b)):
    a = len(b)-i-1
    print(b[a], end='')

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


abc=list("abcdefghijklmnopqrstuvwxyz")

ans=""
while True:
    ans=abc[N%26-1]+ans
    
    if N<27:
        break
    N=(N-1)//26
print(ans)

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

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


l = []

nc = n

while nc > 0:
    if nc % 26 == 0:
        l.append(26)
    else:
        l.append(nc % 26)
    nc -= 1
    nc //= 26

ans = ''

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

print(ans)

Solution (Python):
N = int(input())
lis = [0,26]
num = 26
n = 1
while lis[-1]<N:
    num *= 26
    lis.append(lis[-1]+num)
    n += 1
c = N-lis[-2]-1
ans = ''
for i in range(n):
    ans = chr(c%26+ord('a')) + ans
    c //= 26
print(ans)

Solution (Python):
n=int(input())
k=[]
def a(i):
    if i==0:
        return 26
    else:
        return i
while n>26:
    k+=[chr(96+a(n%26))]
    if n%26==0:
        n=n//26-1
    else:
        n//=26
k+=[chr(96+a(n))]
print("".join(k[::-1]))

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

keta = 0
for i in range(1,20):
    nn -= (26 ** i)
    if nn <= 0:
        keta = i
        break

nn += (26 ** keta - 1)
a = []
for i in range(keta):
    x = nn % 26
    nn //= 26
    a.append(x)
        
ans = []
for i in a[::-1]:
    ans.append(chr(97+i))
    
print(*ans,sep="")

Solution (Python):
import math

import queue
from collections import deque,defaultdict
import heapq as hpq
from sys import stdin,setrecursionlimit


ipt = stdin.readline
setrecursionlimit(10**7)

def main():
    n = int(ipt())-1
    alp = "abcdefghijklmnopqrstuvwxyz"
    s = []
    while n >= 0:
        s.append(alp[n%26])
        n = (n//26-1)
    print("".join(s[::-1]))

    return

if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
ans = ''
for d in range(1, 16):
    n = (N-1) % 26
    ans += chr(97+n)
    if ((N-1) // 26) == 0: break
    N = (N-1) // 26        
print(ans[::-1])

Solution (Python):
def resolve():
    N = int(input())
    print(num2alpha(N).lower())

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

Solution (Python):
from collections import Counter, defaultdict


a = int(input())

abc = "abcdefghijklmnopqrstuvwxyz"

cnt = 0
arr = [0]
back = None

for i in range(1,12):
    cnt += 26**i
    arr.append(cnt)
    if cnt > a:
        break

b = a - arr[i-1] - 1

res = ""
for j in range(i-1, -1, -1):
    res += abc[b//(26**j)]
    b = b%(26**j)

if set(res) == set("z"):
    res = res[:-1]

print(res)

Solution (Python):
import sys
sys.setrecursionlimit(10000000)
MOD = 10 ** 9 + 7
INF = 10 ** 15

def main():
    N = int(input())
    num = []
    now = 0
    for i in range(12):
        now += pow(26,i + 1)
        num.append(now)
    
    for i in range(12):
        if num[i] >= N:
            length = i
            break
    
    ans = ''
    if length > 0:
        N -= num[length - 1]
    N -= 1
    
    
    now = pow(26,length)
    for j in range(length + 1):
        x = N//now
        ans += chr(x + 97)
        N %= now
        now //=26
        
    
    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)
ans=num2alpha(n).lower()
print(ans)

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

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

def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n)-1, n)+alf[(X%n)]
    return alf[(X%n)]

N26 = Base_10_to_n(N-1, 26)
print(N26)

Solution (Python):
from collections import deque
N = int(input()) - 1
ans = deque([N % 26])
while N > 25:
  N //= 26
  N -= 1
  ans.appendleft(N % 26)
answer = "".join(map(lambda x: chr(ord("a") + x), ans))
print(answer)

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
now=26
before = 0
while True:
    if N <= now:
        break
    i += 1
    before = now
    now += 26**i
    

M = N-before
alphabet = "abcdefghijklmnopqrstuvwxyz"
ans=""
for j in range(i):
    dig = int((M-1)//26**(i-j-1))
    
    ans = ans + alphabet[dig]
    M -= dig*26**(i-j-1)
    
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())
print(num2alpha(N).lower())

Solution (Python):




n = int(input())


wkval = n

str = ''
while(wkval > 0):
    div = wkval // 26
    rem = wkval % 26
    if rem == 0:
        str = 'z' + str
        div = (wkval - 1) // 26
    else:
        str = chr(96 + rem) + str
    wkval = div


print(str)

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

readline = sys.stdin.readline
readall = sys.stdin.read
ns = lambda: readline().rstrip()
ni = lambda: int(readline().rstrip())
nm = lambda: map(int, readline().split())
nl = lambda: list(map(int, readline().split()))
prn = lambda x: print(*x, sep='\n')

def solve():
    n = ni() - 1
    i = 1
    v = 26
    while n - v >= 0:
        n -= v
        i += 1
        v *= 26
    s = ''
    for _ in range(i):
        v //= 26
        s += chr(97 + n // v)
        n %= v
    print(s)
    return

solve()

Solution (Python):
n = int(input())
result = ""
while n != 0:
    result = chr(ord('a') + (n - 1) % 26) + result
    n = (n - 1) // 26
print(result)

Solution (Python):
n = int(input())
alfabet = 'abcdefghijklmnopqrstuvwxyz'
name = ''
while True:
  if n <= 26:
    name = alfabet[n-1] + name
    break
  else:
    num = n % 26
    name = alfabet[num-1] + name
    if n%26 ==0:
      n = (n//26) -1
    else:
      n = n//26
print(name)

Solution (Python):
import math
n = int(input())
alphabets = 'abcdefghijklmnopqrstuvwxyz'
def f(X):
    if (int((X-1)/26)):
        return f(int((X-1)/26))+alphabets[(X-1)%26]
    return alphabets[(X-1)%26]
print(f(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)

if __name__ == '__main__':
    n = int(input())
    print(num2alpha(n).lower())

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

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

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

alpha = 'abcdefghijklmnopqrstuvwxyz'

out = ''
while n != 0:
    out = alpha[(n % 26) - 1] + out
    n = int((n-1) // 26)
print(out)

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

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 8)

def Z(): return int(input())
def ZZ(): return [int(_) for _ in input().split()]

def main():

    n = Z()
    alf = 'zabcdefghijklmnopqrstuvwxy'
    ans = []
    while n > 0:
        n, b = divmod(n, 26)
        ans.append(alf[b])
        if b == 0: n -= 1
    print(''.join(ans)[::-1])

    return

if __name__ == '__main__':
    main()

Solution (Python):
import bisect
import copy
import heapq
import sys
import itertools
import math
import queue
from functools import lru_cache
input = sys.stdin.readline
sys.setrecursionlimit(1000000)
mod = 998244353

def read_values(): return map(int, input().split())
def read_index(): return map(lambda x: int(x) - 1, input().split())
def read_list(): return list(read_values())
def read_lists(N): return [read_list() for n in range(N)]


def to_char(a):
    return chr(a + ord("a"))

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

    res = ""
    while N >= 26:
        res = to_char(N % 26) + res
        N //= 26
        N -= 1

    print(to_char(N) + res)


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)


answer = num2alpha(N)
answer = answer.lower()

print(answer)

Solution (Python):
import numpy as np
import math
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())
ans = ""
while N > 0:
  N -= 1
  n = N % 26
  ans = chr(ord("a") + n) + ans
  N //= 26

print(ans)

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

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

print(num2alpha(N).lower())

Solution (Python):
n = int(input())
m = n
a = 1
count = 1
while a <= n:
    if a*26 >= m:
        break
    a*= 26
    m -= a
    count+=1
m -= 1
ans = []
for i in range(count):
    ans.append(m%26)
    m //= 26
ansa = ""
for i in ans:
    ansa += chr(97+i)
print(ansa[::-1])

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

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

while N>0:
    name.append(chr(ord('a')+(N-1)%26))
    N = (N - 1) // 26

name.reverse()
print("".join(name))

Solution (Python):
def funct(num):
    capitals = [chr(x) for x in range(ord('a'), ord('z')+1)]
    result = []
    while num > 0:
        result.append(capitals[(num-1)%26])
        num = (num-1) // 26
    result.reverse()
    return ''.join(result)

print(funct(int(input())))