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 sys,bisect,string,math,time,functools,random,fractions
from heapq import heappush,heappop,heapify
from collections import deque,defaultdict,Counter
from itertools import permutations,combinations,groupby
rep=range
def Golf():n,*t=map(int,open(0).read().split())
def I():return int(input())
def S_():return input()
def IS():return input().split()
def LS():return [i for i in input().split()]
def MI():return map(int,input().split())
def LI():return [int(i) for i in input().split()]
def LI_():return [int(i)-1 for i in input().split()]
def NI(n):return [int(input()) for i in range(n)]
def NI_(n):return [int(input())-1 for i in range(n)]
def StoLI():return [ord(i)-97 for i in input()]
def ItoS(n):return chr(n+97)
def LtoS(ls):return ''.join([chr(i+97) for i in ls])
def RA():return map(int,open(0).read().split())
def GI(V,E,ls=None,Directed=False,index=1):
    org_inp=[];g=[[] for i in range(V)]
    FromStdin=True if ls==None else False
    for i in range(E):
        if FromStdin:
            inp=LI()
            org_inp.append(inp)
        else:
            inp=ls[i]
        if len(inp)==2:
            a,b=inp;c=1
        else:
            a,b,c=inp
        if index==1:a-=1;b-=1
        aa=(a,c);bb=(b,c);g[a].append(bb)
        if not Directed:g[b].append(aa)
    return g,org_inp
def GGI(h,w,search=None,replacement_of_found='.',mp_def={'
    
    mp=[boundary]*(w+2);found={}
    for i in range(h):
        s=input()
        for char in search:
            if char in s:
                found[char]=((i+1)*(w+2)+s.index(char)+1)
                mp_def[char]=mp_def[replacement_of_found]
        mp+=[boundary]+[mp_def[j] for j in s]+[boundary]
    mp+=[boundary]*(w+2)
    return h+2,w+2,mp,found
def TI(n):return GI(n,n-1)
def accum(ls):
    rt=[0]
    for i in ls:rt+=[rt[-1]+i]
    return rt
def bit_combination(n,base=2):
    rt=[]
    for tb in range(base**n):s=[tb//(base**bt)%base for bt in range(n)];rt+=[s]
    return rt
def gcd(x,y):
    if y==0:return x
    if x%y==0:return y
    while x%y!=0:x,y=y,x%y
    return y
def YN(x):print(['NO','YES'][x])
def Yn(x):print(['No','Yes'][x])
def show(*inp,end='\n'):
    if show_flg:print(*inp,end=end)

mo=10**9+7
inf=float('inf')
FourNb=[(-1,0),(1,0),(0,1),(0,-1)];EightNb=[(-1,0),(1,0),(0,1),(0,-1),(1,1),(-1,-1),(1,-1),(-1,1)];compas=dict(zip('WENS',FourNb));cursol=dict(zip('LRUD',FourNb))
l_alp=string.ascii_lowercase

read=sys.stdin.buffer.read
readline=sys.stdin.buffer.readline
input=lambda: sys.stdin.readline().rstrip()

class Tree:
    def __init__(self,inp_size=None,ls=None,init=True,index=1):
        self.LCA_init_stat=False
        self.ETtable=[]
        if init:
            if ls==None:
                self.stdin(inp_size,index=index)
            else:
                self.node_size=len(ls)+1
                self.edges,_=GI(self.node_size,self.node_size-1,ls,index=index)
        return
 
    def stdin(self,inp_size=None,index=1):
        if inp_size==None:
            self.node_size=int(input())
        else:
            self.node_size=inp_size
        self.edges,_=GI(self.node_size,self.node_size-1,index=index)
        return
    
    def listin(self,ls,index=0):
        self.node_size=len(ls)+1
        self.edges,_=GI(self.node_size,self.node_size-1,ls,index=index)
        return
 
    def dfs(self,x,func=lambda pr,prv,nx,dist:prv+dist,root_v=0):
        q=deque([x])
        v=[None]*self.node_size
        v[x]=root_v
        while q:
            c=q.pop()
            for nb,d in self.edges[c]:
                if v[nb]==None:
                    q.append(nb)
                    v[nb]=func(c,v[c],nb,d)
        return v
 
    def bfs(self,x,func=lambda pr,prv,nx,dist:prv+dist,root_v=0):
        q=deque([x])
        v=[None]*self.node_size
        v[x]=root_v
        while q:
            c=q.popleft()
            for nb,d in self.edges[c]:
                if v[nb]==None:
                    q.append(nb)
                    v[nb]=func(c,v[c],nb,d)
        return v
 
    def parent(self,x):
        return self.dfs(0,func=lambda pr,prv,nx,dist:pr,root_v=-1)
 
    def topological_sort(self,x):  
        tps=[]
        q=deque([x])
        v=[None]*self.node_size
        v[x]=0
        while q:
            c=q.popleft()
            tps.append(c)
            for nb,d in self.edges[c]:
                if v[nb]==None:
                    q.append(nb)
                    v[nb]=0
        return tps
 
    def EulerTour(self,x):
        q=deque()
        q.append(x)
        self.depth=[None]*self.node_size
        self.depth[x]=0
        self.ETtable=[]
        self.ETdepth=[]
        self.ETin=[-1]*self.node_size
        self.ETout=[-1]*self.node_size
        cnt=0
        while q:
            c=q.pop()
            if c<0:
                ce=~c
            else:
                ce=c
                for nb,d in self.edges[ce]:
                    if self.depth[nb]==None:
                        q.append(~ce)
                        q.append(nb)
                        self.depth[nb]=self.depth[ce]+1
            self.ETtable.append(ce)
            self.ETdepth.append(self.depth[ce])
            if self.ETin[ce]==-1:
                self.ETin[ce]=cnt
            else:
                self.ETout[ce]=cnt
            cnt+=1
        return
    
    def LCA_init(self,root):
        self.EulerTour(root)
        self.st=SparseTable(self.ETdepth,init_func=min,init_idl=inf)
        
        self.LCA_init_stat=True
        return
    
    def LCA(self,root,x,y):
        if self.LCA_init_stat==False:
            self.LCA_init(root)
        xin,xout=self.ETin[x],self.ETout[x]
        yin,yout=self.ETin[y],self.ETout[y]
        a=min(xin,yin)
        b=max(xout,yout,xin,yin)
        id_of_min_dep_in_et=self.st.query_id(a,b+1)
        return self.ETtable[id_of_min_dep_in_et]
 
    def __str__(self):
        return  str(self.edges)
 
    def show(self):
        if all([all([d==1 for nd,d in e]) for e in self.edges]):
            print( [[nd for nd,d in e] for e in self.edges] )
        else:
            print(self)

class SparseTable: 
    def __init__(self,ls,init_func=min,init_idl=float('inf')):
        self.func=init_func
        self.idl=init_idl
        self.size=len(ls)
        self.N0=self.size.bit_length()
        self.table=[ls[:]]
        self.index=[list(range(self.size))]
        self.lg=[0]*(self.size+1)
        
        for i in range(2,self.size+1):
            self.lg[i]=self.lg[i>>1]+1
 
        for i in range(self.N0):
            tmp=[self.func(self.table[i][j],self.table[i][min(j+(1<<i),self.size-1)]) for j in range(self.size)]
            tmp_id=[self.index[i][j] if self.table[i][j]==self.func(self.table[i][j],self.table[i][min(j+(1<<i),self.size-1)]) else self.index[i][min(j+(1<<i),self.size-1)] for j in range(self.size)]
            self.table+=[tmp]
            self.index+=[tmp_id]
    
    
    def query(self,l,r):
        if r>self.size:r=self.size
        
        N=self.lg[r-l]
        return self.func(self.table[N][l],self.table[N][max(0,r-(1<<N))])
    
    
    def query_id(self,l,r):
        if r>self.size:r=self.size
        
        N=self.lg[r-l]
        a,b=self.index[N][l],self.index[N][max(0,r-(1<<N))]
        if self.table[0][a]==self.func(self.table[N][l],self.table[N][max(0,r-(1<<N))]):
            b=a
        return b
    
    
    def right_bound(self,pos,x):
        k=(self.size-pos).bit_length()
        for j in range(k)[::-1]:
            nx=pos+(1<<j)
            if nx<n and self.query(pos,nx+1)<=x:
                pos+=(1<<j)
        return pos
    
    
    def left_bound(self,pos,x):
        k=pos.bit_length()
        for j in range(k)[::-1]:
            nx=pos-(1<<j)
            if 0<=nx and self.query(nx,pos+1)<=x:
                pos-=(1<<j)
        return pos
 
    def __str__(self):
        return str(self.table[0])
 
    def print(self):
        for i in self.table:
            print(*i)


show_flg=False
show_flg=True


ans=0

n=I()

def solve(n):
    ans=[]
    while n>0:
        t=(n-1)%26
        n-=t
        n//=26
        ans+=[t]
    return LtoS(ans[::-1])

print(solve(n))

Solution (Python):
def main():
    
    N=int(input())
    l=list("abcdefghijklmnopqrstuvwxyz")
    n=N
    name=""
    while n>=26:
        n-=1
        name+=l[n%26]
        n//=26
    if n!=0:
        name+=l[n-1]
    print(name[::-1])

if __name__=="__main__":
    main()

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

Solution (Python):
def main():
    n = int(input())
    a = 'abcdefghijklmnopqrstuvwxyz'
    ans = []
    while n:
        ans.append(a[(n-1) % 26])
        if (n-1) % 26 == 25:
            n -= 1
        n //= 26
    print("".join(reversed(ans)))


main()

Solution (Python):
import string

N = int(input())
name_l = list(string.ascii_lowercase)

name_N = ''
div_N = N

while True:
    i = div_N%26
    if i == 0:
        i = 26
    name_N = name_l[i-1] + name_N
    if div_N <= 26:
        break
    div_N //= 26
    if i == 26:
        div_N -= 1

print(name_N)

Solution (Python):
alphabet = "abcdefghijklmnopqrstuvwxyz"

N = int(input())

ans = ""
while N > 0:
    r = (N-1) % 26
    ans += alphabet[r]
    N = (N-r) // 26

print(ans[::-1])

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

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

now = 0
for i in range(1,20):
    now += 26**i
    if now >= N:
        keta = i
        break
    
for i in range(keta):
    if i != 0:
        N -= 26**(i)

N = N-1
answer_list = []
for i in range(keta-1):
    answer_list.append(N//26**(keta-(i+1)))
    N = N%26**(keta-(i+1))
    
answer_list.append(N)

for i in range(len(answer_list)):
    answer_list[i] = chr(answer_list[i]+97)
print("".join(str(n) for n in answer_list))

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

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

    N //= 26

print(ans[::-1])

Solution (Python):
n = int(input())
ans = ''
alp = lambda x: chr(x + ord('a') - 1) if x != 0 else 'z'
x = 0
while n != 0:
    rem = (n % (26 ** (x + 1))) // (26 ** x)
    ans = alp(rem) + ans
    n -= rem * 26 ** x if rem != 0 else 26 ** (x + 1)
    x += 1
print(ans)

Solution (Python):
n=int(input())
ans=[]
while n>26:
	tmp=n%26
	if tmp==0:
		tmp=26
		n-=1
	ans.append(tmp)
	n=n//26
ans.append(n)
ans=ans[::-1]
for a in ans:
	print(chr(a+96),end="")

Solution (Python):
def get_name(n, alphabet):
  if n // len(alphabet):
    return get_name(n // len(alphabet), alphabet) + alphabet[n % len(alphabet)]
  return alphabet[n % len(alphabet)]

N = int(input())
i = 0
alphabet = 'abcdefghijklmnopqrstuvwxyz'
while True:
  N -= len(alphabet) ** i
  if N < len(alphabet) ** (i + 1):
    name = get_name(N, alphabet)
    for j in range(i + 1 - len(name)):
      name = alphabet[0] + name
    break
  else:
    i += 1
    
print(name)

Solution (Python):
n = int(input())
abc = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
res = []
ans = ''
while n:
    res.append((n-1)%26)
    n = (n-1)//26




for i in range(len(res)):
    ans += abc[res[i]]

print(ans[::-1])

Solution (Python):
import string

N = int(input())

g = 1
while N > 26**g:
    N -= 26**g
    g += 1

N -= 1
ans = ""
for i in range(g):
    c = N % 26
    ans = string.ascii_lowercase[c] + ans
    N = N // 26

print(ans)

Solution (Python):
n = int(input())
ans = ''
m = ord('a') - 1
x = 0
while n != 0:
    rem = (n % (26 ** (x + 1))) // (26 ** x)
    if rem == 0:
        ans = 'z' + ans
        n -= 26 ** (x + 1)
    else:
        ans = chr(m + rem) + ans
        n -= rem * 26 ** x
    x += 1
print(ans)

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

s,c=[],1
while N>0:
  if N>26**c:
    N-=26**c
    c+=1
  else:
    N-=1
    while c>0:
      s.append(chr(0x61+N%26))
      N//=26
      c-=1

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

Solution (Python):
import sys
import math


from sys import stdin,stdout
from collections import deque,defaultdict
from math import ceil,floor,inf,sqrt,factorial,gcd,log2
from copy import deepcopy
ii1=lambda:int(stdin.readline().strip())
is1=lambda:stdin.readline().strip()
iia=lambda:list(map(int,stdin.readline().strip().split()))
isa=lambda:stdin.readline().strip().split()
mod=1000000007
s='abcdefghijklmnopqrstuvwxyz'
n=ii1()
res=''
for i in range(1,100):
    if n<=26**i:
        n-=1
        for j in range(i):
            res+=chr(97+n%26)
            n//=26
        break
    else:
        n-=26**i
print(res[::-1])

Solution (Python):
n = int(input())
l = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
answer = []
while n >= 1:
    n -= 1
    answer.append(l[n % 26])
    n = n//26
ans = ''.join(list(reversed(answer)))
print(ans)

Solution (Python):
n = int(input())
chars = "Xabcdefghijklmnopqrstuvwxyz"

n_rem = n  
res = ""

while True:
    x = n_rem % 26
    
    if x == 0:
        x = 26
    res += chars[x]

    
    n_rem -= x

    
    if n_rem == 0:
        break

    n_rem //= 26


print(res[::-1])

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

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

ans = ''
while n:
	d = (n-1) % 26 + 1
	ans += a[d-1]
	n = (n-1) // 26

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

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

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

print(ans[::-1])

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

while n > 0:
  n -= 1
  ans += chr(n % 26 + 97)
  n //= 26

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

Solution (Python):
ans=''
n=int(input())
while n:
    r=n%26
    q=n//26
    if r==0:
        q=q-1
        ans=ans+'z'
    else:
        ans=ans+chr(97+r-1)
    n=q
print(ans[::-1])

Solution (Python):





import sys,os
from io import BytesIO, IOBase
import collections,itertools,bisect,heapq,math,string
from decimal import *


BUFSIZE = 8192

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


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

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

Solution (Python):
n = int(input())
keta = 1
end = 0
while True:
    order = n - end
    end += 26**keta
    if n <= end:
        break
    keta += 1
order -= 1
ans = []
for i in range(keta):
    ans.append(chr(order%26 + 97))
    order //= 26
ans.reverse()
print("".join(ans))

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

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

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

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

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

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

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

Solution (Python):

def solve(num):
  div = (num-1)//26
  rest = (num-1)%26
  if div:
    return solve(div) + chr(rest+97)
  else:
    return chr(rest+97)
  
num = int(input())
print(solve(num))

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

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

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

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






n = getN()
lista = []
digit = 26
i = 0

while n != 0:
    opt = n % digit
    lista.insert(0, opt)
    if n % digit == 0:
        n = n // digit - 1
    else:
        n = n // digit
    i += 1

str_list = 'abcdefghijklmnopqrstuvwxyz'
ans = ''
for i in range(len(lista)):
    ans += str_list[lista[i] - 1]
print(ans)

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

ans = ""
for i in range(1, 99):
  if N <= 26 ** i:
    N -= 1
    for j in range(i):
      ans += d[N % 26]
      N //= 26
    break
  else:
    N -= 26 ** i
print(ans[::-1])

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

name = ""

while True:
    n -= 1
    tail = n % 26
    name += chr(ord('a') + tail)
    n //= 26

    if n == 0:
        print(name[::-1])
        exit(0)

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

Solution (Python):
N = int(input())
keta = 1
now = 0
while now+pow(26,keta) < N:
    now += pow(26,keta)
    keta += 1
ans = ""
while keta:
    for i in range(1,27):
        if N <= now+pow(26,keta-1)*i:
            now += pow(26,keta-1)*(i-1)
            ans += chr(ord('a')+i-1)
            break
    keta -= 1
print(ans)

Solution (Python):
arphaList = 'abcdefghijklmnopqrstuvwxyz'
result = ""
N = int(input())

while N != 0:
  arpha = arphaList[(N + 25) % 26]
  result += arpha
  N = N // 26
  if arpha == "z":
    N -= 1
print(result[::-1])

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

N = int(input())

print(num2alpha(N))

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

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

print(ans[::-1])

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

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

basis=[26**i for i in range(12)]
l=[]
s=0
for b in basis:
    s+=b
    l.append(s)    

i=0
f=12
while(f-i>1):

    x=(i+f)//2
    if l[x]>n:
        f=x
    else:
        i=x

length=i+1
k=n-(l[length-1]-1)
x=k-1
res=[]
for i in range(length):
    q=x//26
    r=x%26
    x=q
    res.append(r)

ans=list(map(lambda x: chr(ord("a")+x),list(reversed(res))))
print("".join(ans))

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

ans.reverse()
print(''.join(ans))

Solution (Python):
N = int(input())
A = 0
ans = ''
for i in range(1,15):
    if N <= A + 26 ** i:
        l = i
        break
    A += 26**i

M = N - A - 1

for i in range(l):
    c = M % 26
    M //= 26
    ans += chr(ord('a') + c)

print(ans[::-1])

Solution (Python):
import sys
import math

t=1

for _ in range(t):
    n=int(input())
    
    suma=0
    length=0
    mul=1
    ans=[]
    while n>0:
        n-=1
        ans.append(chr(n%26+97))
        n//=26
    print(*ans[::-1],sep="")

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

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

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

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

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

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

convert = {
    1:'a',
    2:'b',
    3:'c',
    4:'d',
    5:'e',
    6:'f',
    7:'g',
    8:'h',
    9:'i',
    10:'j',
    11:'k',
    12:'l',
    13:'m',
    14:'n',
    15:'o',
    16:'p',
    17:'q',
    18:'r',
    19:'s',
    20:'t',
    21:'u',
    22:'v',
    23:'w',
    24:'x',
    25:'y',
    26:'z',
}
def Base_n_to_10(X, n):
    if (int(X/n)):
        return Base_n_to_10(int(X/n), n)+str(X%n)
    return str(X%n)

def main():
    r = []
    n = int(input())
    while True:
        n -= 1
        r.append(n % 26)
        n = n // 26
        if n == 0: break
    for i in r[::-1]:
        print(convert[i+1], end='')
    print()
if __name__ == "__main__":
    main()

Solution (Python):
def to_n(x,n,cnt):
    ans=[]
    for _ in range(cnt):
        ans.append(x%n)
        x//=n
    return ans[::-1]

from sys import stdin
def main():
    
    readline=stdin.readline
    n=int(readline())

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

    tmp=26
    cnt=1
    while n>tmp:
        n-=tmp
        tmp*=26
        cnt+=1
    
    n-=1
    m=to_n(n,26,cnt)
    ans="".join([alp[m[i]] for i in range(len(m))])
    print(ans)

if __name__=="__main__":
    main()

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

cnt = 0
digits = 0
for i in range(1, 12):
    cnt += pow(26, i)
    if n <= cnt:
        digits = i
        break

k = n - cnt + pow(26, digits) - 1


alf = 'abcdefghijklmnopqrstuvwxyz'
ans = ''

for i in range(digits):
    q = k // 26
    r = k%26
    ans = alf[r] + ans
    k = q
print(ans)

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

basis=[26**i for i in range(12)]
l=[]
s=0
for b in basis:
    s+=b
    l.append(s)    

i=0
f=12
while(f-i>1):

    x=(i+f)//2
    if l[x]>n:
        f=x
    else:
        i=x

k=n-l[i]
length=i+1

res=[]
for i in range(length):
    q=k//26
    r=k%26
    k=q
    res.append(r)

ans=list(map(lambda x: chr(ord("a")+x),list(reversed(res))))
print("".join(ans))

Solution (Python):
import os
import sys
from atexit import register
from io import BytesIO
sys.stdin = BytesIO(os.read(0, os.fstat(0).st_size))
sys.stdout = BytesIO()
register(lambda: os.write(1, sys.stdout.getvalue()))
input = lambda: sys.stdin.readline().rstrip('\r\n')
raw_input = lambda: sys.stdin.readline().rstrip('\r\n')

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

Solution (Python):
N = int(input())
moji =  ''
while True:
    if N % 26 == 0:
        moji = 'z' + moji
        N = N // 26 - 1
    elif N % 26 > 0 and N % 26 < 10:
        moji = chr(ord(str(N % 26)) + 48) + moji
        N //= 26
    elif N % 26 > 9 and N % 26 < 20:
        moji = chr(ord(str(N % 26 - 10)) + 58) + moji
        N //= 26
    else:
        moji = chr(ord(str(N % 26 - 20)) + 68) + moji
        N //= 26

    if N == 0:
        break
print(moji)

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

cnt = 1

ans = []

while n>0:
    n -= 1
    x = n%(26)
    ans.append(chr(x+97))
    n = n//26
    cnt += 1
    
ans.reverse()

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

Solution (Python):
n = int(input())
alf = [chr(i) for i in range(97, 97+26)]
ans = ''
while(n != 0):
    a = n % 26
    if a == 0:
        a = 26
    ans = alf[a-1] + ans
    n = (n - a)//26
print(ans)

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

for i in range(1, 30):
    if n <= 26**i:
        n -= 1
        for j in range(i):
            ans += chr(ord('a') + n % 26)
            n //= 26
        break
    else:
        n -= 26**i

print(ans[::-1])

Solution (Python):
N = int(input())
ans = []
while N:
    N -= 1
    N, r = divmod(N, 26)
    ans.append(chr(ord('a') + r))
print("".join(reversed(ans)))

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

Solution (Python):
def to_n(x,n):
    ans=[]
    if x==0:
        return [0]
    while x>0:
        x-=1
        ans.append(x%n)
        x//=n
    return ans[::-1]

from sys import stdin
def main():
    
    readline=stdin.readline
    n=int(readline())

    alp=[chr(i) for i in range(97,97+26)]
    m=to_n(n,26)
    ans=[alp[m[i]] for i in range(len(m))]
    print("".join(ans))

if __name__=="__main__":
    main()

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

if __name__ == '__main__':
    main()

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

x = 1
leng = 0

while True:
    if n-x < 0: break
    n -= x
    leng += 1
    x *= 26

ans = ["a"] * leng

for i in range(leng):
    ans[i] = chr(n % 26 + ord("a"))
    n //= 26

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

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

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

Solution (Python):
n = int(input())
chars = "Xabcdefghijklmnopqrstuvwxyz"  

n_rem = n  
res = ""
while True:
  x = n_rem % 26
  if x == 0:
    x = 26
  res += chars[x]
  n_rem -= x
  
  if n_rem == 0:
    break
  n_rem //= 26
print(res[::-1])

Solution (Python):
n=int(input())
ans=str()
while(n>0):
    n=n-1
    k=n%26
    ans=chr(ord('a')+k)+ans
    n//=26
print(ans)

Solution (Python):
N=int(input())
abc=[chr(i) for i in range(97, 97+26)]
ans=""
while N>0:
    N-=1
    ans+=(abc[N%26])
    N//=26
print(ans[::-1])

Solution (Python):
import sys
input = sys.stdin.readline
N = int(input())
res = ""
while N:
  N -= 1
  res += chr(N % 26 + ord("a"))
  N //= 26
print(res[: : -1])

Solution (Python):
from string import ascii_lowercase


def calc_name_length(N: int) -> int:
    name_length: int = 0
    total: int = 0

    for i in range(1, 12):
        total += 26 ** i
        if N <= total:
            name_length = i
            break

    return name_length


def calc_name_number(N: int, name_length: int) -> int:
    total: int = 0

    for i in range(1, name_length):
        total += 26 ** i

    N = N - (total + 1)

    return N


def calc_name(name_length: int, name_number: int) -> str:
    name: str = ""

    for _ in range(name_length):
        name += ascii_lowercase[name_number % 26]
        name_number //= 26

    return name


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

    name_length: int = calc_name_length(N)
    name_number: int = calc_name_number(N, name_length)
    name: str = calc_name(name_length, name_number)

    print(name[::-1])


if __name__ == "__main__":
    main()

Solution (Python):
N = int(input())
name = ""
for i in range(20):
    N -= 1
    N_mod = N % 26
    N_div = N // 26
    Nmod_to_alp = chr(N_mod+ord("a"))
    name = Nmod_to_alp + name
    if N_div == 0:
        break
    else:
        N = N_div
print(name)

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


def rec(n, result):
    q, mod = divmod(n, 26)

    if q == 0:
        if mod != 0:
            result += chr(mod + 96)
        return result

    if mod == 0:
        result += 'z'
        q = q - 1
    else:
        result += chr(mod + 96)

    n = q
    return rec(n, result)


result = rec(n, result)
print(result[::-1])

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

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

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



print(ans)

Solution (Python):
n = int(input())
a = []
while n > 0:
    n -= 1
    a.append(n%26)
    n = n // 26
ans = ""
for i in range(len(a)):
    ans += chr(ord("a")+a[(-1)*(i+1)])
print(ans)

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

Solution (Python):


def dog(n):
    abc = 'abcdefghijklmnopqrstuvwxyz'
    n -= 1
    pow = [0]
    cum = 0
    for i in range(1, 12):
        cum += 26**i
        pow.append(cum)
    for i in range(1, 12):
        if pow[i - 1] <= n <  pow[i]:
            break
    
    dig = []
    n = n - pow[i - 1]
    
    for j in range(i):
        n2 = n // 26
        dig.append(n % 26)
        n = n2
    str = [abc[i] for i in reversed(dig)]
    str = ''.join(str)
    print(str)

n = int(input())
dog(n)

Solution (Python):




def base_10_to_n(X, n):
    ans = []

    while X > 0:
        X -= 1
        ans.insert(0, X % n)
        X //= n

    return ans


def main():
    N = int(input())
    n26 = base_10_to_n(N, 26)

    ans = []

    for n in n26:
        ans.append(chr(97 + int(n)))
    
    print("".join(ans))


if __name__ == "__main__":
    main()