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

from collections import defaultdict

import sys, math
f = None
try:
	f = open('q1.input', 'r')
except IOError:
	f = sys.stdin
if 'xrange' in dir(__builtins__):
	range = xrange

sys.setrecursionlimit(10**2)

	
def print_case_iterable(case_num, iterable):
	print("Case 

def print_case_number(case_num, iterable):
	print("Case 

def print_iterable(A):
	print (' '.join(A))

def read_int():
	return int(f.readline().strip())
def read_int_array():
	return [int(x) for x in f.readline().strip().split(" ")]
def rns():
	a =  [x for x in f.readline().split(" ")]
	return int(a[0]), a[1].strip()
def read_string():
	return list(f.readline().strip())
def ri():
	return int(f.readline().strip())
def ria():
	return [int(x) for x in f.readline().strip().split(" ")]
def rns():
	a =  [x for x in f.readline().split(" ")]
	return int(a[0]), a[1].strip()
def rs():
	return list(f.readline().strip())
def bi(x):
	return bin(x)[2:]





from collections import deque
import math

NUMBER = 998244353
def factorial(n) : 
	M = NUMBER
	f = 1
  
	for i in range(1, n + 1):  
		f = (f * i) % M 
						
	return f
def mult(a,b):
	return (a * b) % NUMBER

def minus(a , b):
	return (a - b) % NUMBER

def plus(a , b):
	return (a + b) % NUMBER

def egcd(a, b):
	if a == 0:
		return (b, 0, 1)
	else:
		g, y, x = egcd(b % a, a)
		return (g, x - (b // a) * y, y)

def modinv(a):
	m = NUMBER
	g, x, y = egcd(a, m)
	if g != 1:
		raise Exception('modular inverse does not exist')
	else:
		return x % m
def choose(n,k):
	if n < k:
		assert false
	return  mult(factorial(n), modinv(mult(factorial(k),factorial(n-k))))
from collections import deque, defaultdict 
import heapq


from types import GeneratorType
def bootstrap(f, stack=[]):
	def wrappedfunc(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		else:
			to = f(*args, **kwargs)
			while True:
				if type(to) is GeneratorType:
					stack.append(to)
					to = next(to)
				else:
					stack.pop()
					if not stack:
						break
					to = stack[-1].send(to)
			return to

	return wrappedfunc


def dfs(g, timeIn, timeOut,depths,parents): 
	
	cnt = 0
	
	stack = [[1,0,0,0]]
	while stack:
		v,neig_i,parent,depth = stack[-1]
		parents[v] = parent
		depths[v] = depth
		
		if neig_i == 0:
			timeIn[v] = cnt    
			cnt+=1
		while neig_i < len(g[v]):
			u = g[v][neig_i]
			if u == parent:
				neig_i+=1
				continue
			stack[-1][1] = neig_i + 1
			stack.append([u,0,v,depth+1])
			break
		if neig_i == len(g[v]):
			stack.pop()
			timeOut[v] = cnt
			cnt += 1
  
def isAncestor(u: int, v: int, timeIn: list, timeOut: list) -> str: 
	return timeIn[u] <= timeIn[v] and timeOut[v] <= timeOut[u] 

cnt = 0
@bootstrap
def dfs(v,adj,timeIn, timeOut,depths,parents,parent=0,depth=0):
	global cnt
	parents[v] = parent
	depths[v] = depth
	timeIn[v] = cnt
	cnt+=1
	for u in adj[v]:
		if u == parent:
			continue
		yield dfs(u,adj,timeIn,timeOut,depths,parents,v,depth+1)
	timeOut[v] = cnt
	cnt+=1
	yield 


def solution(n):
	
	res = []
	
	while n > 0:
		n = n-1
		res.append(chr(ord('a')+n%26))
		n//=26
	
	return ''.join(reversed(res))


	
def main():
	T = 1
	
	for i in range(T):
		
		n = ri()
		
		

		x = solution(n)
		if 'xrange' not in dir(__builtins__):
			print(x)
		else:
			print >>output,str(x)
	if 'xrange' in dir(__builtins__):
		print(output.getvalue())
		output.close()

if 'xrange' in dir(__builtins__):
	import cStringIO
	output = cStringIO.StringIO()




if __name__ == '__main__':
	main()

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

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

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

print(ans[::-1])

Solution (Python):
def main():
    n = int(input())
    n -= 1
    res = ''
    while n >= 0:
        n, m = divmod(n, 26)
        res += chr(97 + m)
        n -= 1

    print(res[::-1])


if __name__ == '__main__':
    main()

Solution (Python):

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


def nanketa(X):
    n = 1
    a = 0
    while X > (26 ** n) + a:
        a += 26 ** n
        n += 1
    return n




x10 = int(input())
x2 = Base_10_to_n(x10, 26)

ans = ""
a = ""
cnt = 0
x2 = list(x2.split(" "))[:-1]
x2 = list(map(int, x2))

    


for x in x2:
    ans += chr(x + 97)

print(ans)

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 8)
ini = lambda: int(sys.stdin.readline())
inm = lambda: map(int, sys.stdin.readline().split())
inl = lambda: list(inm())
ins = lambda: sys.stdin.readline().rstrip()
debug = lambda *a, **kw: print(*a, **kw, file=sys.stderr)

N = ini()


def solve():
    k = 26
    a = k
    p = k
    l = 1
    while a < N:
        p *= 26
        a += p
        l += 1
    x = N - (a - p) - 1
    name = [None] * l
    for i in range(l):
        c = x % 26
        name[i] = chr(ord("a") + c)
        x //= 26
    return "".join(reversed(name))


print(solve())

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

while  N  > 0:
    N, mod = divmod((N-1), 26)
    name.insert(0,chr(97+mod))
name=''.join(name)
print(name)

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

n = 1
s = 26
for i in range(1,12):
    if N <= s:
        n = i
        break
    else:
        s += 26**(i+1)
        
s = 0
for i in range(1,n):
    s += 26**i
    
N = N - s - 1
if N == 0:
    Ans = ""
    for _ in range(n):
        Ans += "a"
else:
    L = [0 for _ in range(n)]
    i = 1
    while N > 0:
        L[-i] = N%26
        N = N//26
        i +=1
    
    Ans = ""
    for x in L:
        Ans += alphabet[x]
print(Ans)

Solution (Python):
def base10to(base, target, conv_list):
    if target <= base:
        conv_list.insert(0, target)
        return conv_list
    elif target % base == 0:
        conv_list.insert(0, base)
        return base10to(base, target // base - 1, conv_list)
    else:
        conv_list.insert(0, target % base)
        return base10to(base, target // base, conv_list)


def ret_alpha(target):
    return chr(96 + target)


def main():
    num = int(input())
    base = 26
    result_list = list()
    result_list = base10to(base, num, result_list)

    result = ''
    for i in result_list:
        result = result + ret_alpha(i)
    print(result)


if __name__ == '__main__':
    main()

Solution (Python):
alph = 'abcdefghijklmnopqrstuvwxyz'
def acc_seq(i):
  return 26 * (pow(26, i) - 1) // 25

def name_dog(digit, at, name):
  if digit ==1:
    return name + alph[at]
  else:
    group = at // pow(26, digit - 1)
    at -= pow(26, digit - 1) * group
    name += alph[group]
    return name_dog(digit-1, at, name)

n = int(input())
digit = 1
while(n > acc_seq(digit)):
  digit += 1

at = abs(n - acc_seq(digit - 1) - 1)
print(name_dog(digit, at, ''))

Solution (Python):
from collections import deque

def to_char(n):
    base = ord('a')
    return chr(base + n)

def main():
    N = int(input())
    q = deque([])
    
    while N > 0:
        N -= 1
        v = N % 26
        q.appendleft(v)
        N //= 26

    
    print(''.join(map(to_char, q)))

if __name__ == '__main__':
    main()

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
input = sys.stdin.readline

import math

import bisect
import heapq
from collections import defaultdict
from collections import deque
from collections import Counter
from functools import lru_cache






MOD = 10**9+7
INF = float('inf')
AZ = "abcdefghijklmnopqrstuvwxyz"






def I(): return int(input().strip())
def S(): return input().strip()
def IL(): return list(map(int,input().split()))
def SL(): return list(map(str,input().split()))
def ILs(n): return list(int(input()) for _ in range(n))
def SLs(n): return list(input().strip() for _ in range(n))
def ILL(n): return [list(map(int, input().split())) for _ in range(n)]
def SLL(n): return [list(map(str, input().split())) for _ in range(n)]


def P(arg): print(arg); return
def Y(): print("Yes"); return
def N(): print("No"); return
def E(): exit()
def PE(arg): print(arg); exit()
def YE(): print("Yes"); exit()
def NE(): print("No"); exit()


def DD(arg): return defaultdict(arg)



def inv(n): return pow(n, MOD-2, MOD)


kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret


def factorization(n):
  arr = []
  temp = n
  for i in range(2, int(-(-n**0.5//1))+1):
    if temp%i==0:
      cnt=0
      while temp%i==0: 
        cnt+=1 
        temp //= i
      arr.append([i, cnt])
  if temp!=1:
    arr.append([temp, 1])
  if arr==[]:
    arr.append([n, 1])
  return arr


def make_divisors(n):
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
      if i != n // i: 
        divisors.append(n//i)
  return divisors


def make_primes(N):
  max = int(math.sqrt(N))
  seachList = [i for i in range(2,N+1)]
  primeNum = []
  while seachList[0] <= max:
    primeNum.append(seachList[0])
    tmp = seachList[0]
    seachList = [i for i in seachList if i % tmp != 0]
  primeNum.extend(seachList)
  return primeNum


def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


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


def count_bit(n):
  count = 0
  while n:
    n &= n -1
    count += 1
  return count


def base_10_to_n(X, n):
  if X//n:
    return base_10_to_n(X//n, n)+[X%n]
  return [X%n]

def base_n_to_10(X, n):
  return sum(int(str(X)[-i-1])*n**i for i in range(len(str(X))))

def base_10_to_n_without_0(X, n):
  X -= 1
  if X//n:
    return base_10_to_n_without_0(X//n, n)+[X%n]
  return [X%n]


def int_log(n, a):
  count = 0
  while n>=a:
    n //= a
    count += 1
  return count





N = I()
print(*[AZ[x] for x in base_10_to_n_without_0(N, 26)],sep="")

Solution (Python):
n = int(input())
res=""
while (n>0):
    if n%26==0:
        res+=(chr(96+26))
        n=n//26
        n=n-1
    else:
        res+=(chr(96+n%26))
        n=n//26
    
print(res[::-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):
p = [pow(26, i) for i in range(17)]
num = [0 for i in range(17)]
for i in range(17):
  if i == 0:
    continue
  if i == 1:
    num[i] = 26
  else:
    num[i] = num[i-1] + p[i]
n = int(input())
ans = ''
l = 0
while n > num[l]:
  l += 1
x = n - num[l-1] - 1
for _ in range(l):
  c = chr(ord("a") + x % 26)
  ans = c + ans
  x //= 26
print(ans)

Solution (Python):


import sys
import numpy as np
int1 = lambda x: int(x) - 1
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)

N = int(readline())
ans = ""

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

print(ans)

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

d = 26
for i in range(1,15):
    if N >= d:
        N -= d
        d *= 26
    else:
        d //= 26
        ans = ""
        
        
        
        

        for j in range(i):
            ans += chr(N % 26 + ord("a"))
            N //= 26
        break

print(ans[::-1])

Solution (Python):


n=int(input())




def f(x):
    return chr(x+96)

ans = ""
while n >= 26:
    if n % 26 == 0:
        ans += 'z'
        n //= 26
        n -= 1
    else:
        ans += f(n % 26)
        n //= 26
if n != 0:
    ans += f(n)
print(ans[::-1])

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

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

d = 26
for i in range(1,15):
    if N >= d:
        N -= d
        d *= 26
    else:
        d //= 26
        ans = ""
        for j in range(i):
            ans += chr(N // d + ord("a"))
            N %= d
            d //= 26
        break

print(ans)

Solution (Python):
import numpy as np
import math
N = int(input())
lennum = np.array([26**i for i in range(1,13)])
sumnum = np.array([sum(lennum[:i]) for i in range(12)])
lennum = np.hstack((1, lennum))
lennum,sumnum

dig = min(np.where(sumnum >= N)[0])
n = N - sumnum[dig - 1]
n, dig
ret =''
tmp = n
for i in range(dig)[::-1]:
    dig_i = math.ceil(tmp/lennum[i])
    ret += chr(97 + dig_i - 1)
    tmp = tmp - lennum[i]*(dig_i - 1)
print(ret)

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

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']
res = []
q=N
while(q>0):
    r = q % 26
    q = q //26
    if(r==0):
        res.append(L[26])
        q -= 1
    else:
        res.append(L[r])
for i in range(len(res)-1,-1,-1):
    print(res[i],end='',sep='')

Solution (Python):
n = int(input()) - 1
i = 1
s = 26

while n >= s:
    n -= s
    s *= 26
    i += 1

lst = []
for j in range(i):
    lst.append(n % 26)
    n //= 26

for j in lst[::-1]:
    print(chr(j + ord('a')), end='')

Solution (Python):

import sys

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



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    N = int(next(tokens))  
    solve(N)


if __name__ == "__main__":
    main()

Solution (Python):
from sys import stdin, stdout, setrecursionlimit
from collections import deque, defaultdict, Counter
import math

rl = lambda: stdin.readline()
rll = lambda: stdin.readline().split()
rli = lambda: map(int, stdin.readline().split())
rlf = lambda: map(float, stdin.readline().split())

INF, NINF = float('inf'), float('-inf')

tonum = lambda c: ord(c) - 97
tochr = lambda num: chr(num + 97)

def to26(n):
	ans = deque()
	while n:
		n -= 1
		n, dig = divmod(n, 26)
		ans.appendleft(dig)
	return ans

def main():
	n = int(rl())
	ans = [tochr(x) for x in to26(n)]
	print("".join(x for x in ans))
	stdout.close()

if __name__ == "__main__":
	main()

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

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

Solution (Python):
import sys
sys.setrecursionlimit(100000)

def group(num):
    return sum([26**i for i in range(num)])

N = int(input())

group_num = 1
while group(group_num + 1) <= N:
    group_num += 1

kth_place = N - (group(group_num) - 1)
kth_place -= 1
ans = []
for i in range(group_num):
    ans.append(chr(ord('a') + (kth_place % 26)))
    kth_place //= 26
    if not kth_place > 0:
        break

if len(ans) < group_num:
    ans.extend(['a' for i in range(group_num - len(ans))])

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

Solution (Python):
N=int(input())
res=""
while(N):

    N-=1
    res=res+chr(ord("a")+int(N%26))
    N=int(N/26)
res=res[::-1]
print(res)

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

x = n 
nums = []
ans = ''
for i in range(1, 12):
    if 26**i >= n:
        for _ in range(i):
            x -= 1
            l = x % 26
            x //=  26
            nums.append(l)
        break
    else:
        n -= 26**i
        
for _ in nums:
    ans +=(chr(ord('a') + _))
    
print(ans[::-1])

Solution (Python):


N = int(input())
res = ''

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

print(res[::-1])

Solution (Python):

N = int(input())
i = 0
lst = []
str_map = [chr(i) for i in range(97, 97+26)]
while N > 0:
    i = (N - 1) % 26
    N = (N - 1) // 26
    lst.append(str_map[i])
print(''.join(list(reversed(lst))))

Solution (Python):
def f(n):
    a = []
    while n > 0:
        n -= 1
        a.append(chr(ord('a') + n % 26))
        n //= 26
    return a

if __name__ == "__main__":
    n = int(input())
    a = f(n)
    print(''.join(a[::-1]))

Solution (Python):


import sys
























from itertools import accumulate             






def main():
    mod = 1000000007                
    inf = float('inf')              
    
    sys.setrecursionlimit(10**6)    
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def isp():   return input().split()
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    
    n = ii()
    d = 0
    ac = list(accumulate([pow(26, i+1) for i in range(15)]))
    while True:
        if ac[d] >= n:
            break
        d += 1
    
    if d > 0:
        n -= ac[d-1]
    

    def convert_to_alpha(num):
        return chr(ord('a') + num)

    n -= 1
    
    L = [None] * (d + 1)
    for i in range(d + 1):
        L[i] = convert_to_alpha(n % 26)
        n //= 26
    
    print(''.join(reversed(L)))

    
    



if __name__ == "__main__":
    main()

Solution (Python):
import string

n = int(input())

l = 1
while True:
    nn = 26 ** l
    if n <= nn:
        n -= 1
        o = []
        for _ in range(l):
            c = n % 26
            o.append(string.ascii_lowercase[c])
            n = n // 26
        print(''.join(o[::-1]))
        exit(0)
    n -= nn
    l += 1

Solution (Python):

def main():
    N = int(input())
    res = ""
    while N:
        N -= 1
        res += chr(97 + N % 26)
        N //= 26
    print(res[::-1])


if __name__ == "__main__":
    main()

Solution (Python):

def main():
    N = int(input())
    res = ""
    int_to_abc = lambda i: chr(97 + N % 26)
    while N:
        N -= 1
        res += int_to_abc(N)
        N //= 26
    print(res[::-1])


if __name__ == "__main__":
    main()

Solution (Python):
n = int(input())
al = 'abcdefghijklmnopqrstuvwxyz'
n -= 1

a = n
cnt = 1
while a >= 26**cnt:
    a -= 26**cnt
    cnt += 1

ans = ''
for i in range(cnt):
    ans += al[n%26]
    n //= 26
    n -= 1
print(ans[::-1])

Solution (Python):
N = int(input())
def function(X):
    c = 0
    for t in range(1,1000):
        if X <= c + 26**t:
            return t, c
        c += 26**t

def function2(n,y):
    if y == 1:
        return chr(ord('a') + ((n-1) // (26**(y-1))))
    else:
        if (n % (26**(y-1))) == 0:
            return chr(ord('a') + ((n-1) // (26**(y-1)))) + function2((26**(y-1)),y-1)
        else:
            return chr(ord('a') + ((n-1) // (26**(y-1)))) + function2((n % (26**(y-1))),y-1)
keta, summ = function(N)
summ = N - summ
print(function2(summ,keta))

Solution (Python):
import string

n = int(input())
alphabets = string.ascii_lowercase
answer = []
while n >= 1:
    n -= 1
    answer.append(alphabets[n % 26])
    n = n//26
ans = ''.join(list(reversed(answer)))
print(ans)

Solution (Python):
import math
n=int(input())
d=math.floor(math.log(1+(26-1)*n,26))
p=int(n-(26**d-1)/(26-1))
t=list('a'*d)
for i in range(d):
    t[d-i-1]=chr(ord(t[d-i-1])+(p%26))
    p=p//26
print(''.join(t))

Solution (Python):
N, = map(int, input().split())
al = "zabcdefghijklmnopqrstuvwxy"
rs = []
while N:
    m = N%26
    N = -(-N//26)-1
    rs.append(al[m])
print("".join(rs[::-1]))

Solution (Python):

def main2():
    n = int(input())
    d = 0
    keta = 0
    tmp = n
    ans = ""
    while n > 0:
        n -= 1
        ans += chr(ord('a') + (n%26))
        n //= 26
    print(ans[::-1])

if __name__ == '__main__':
    main2()

Solution (Python):
import math
n=int(input())
d=math.floor(math.log(1+(26-1)*n,26))
position=int(n-(26**d-1)/(26-1))
txt=list('a' * d)
for i in range(d):
    txt[d-i-1]=chr(ord(txt[d-i-1])+(position%26))
    position=position//26
print(''.join(txt))

Solution (Python):
import math
n = int(input())
d = math.floor(math.log(1+(26-1)*n, 26))
position = int(n - (26**d - 1) / (26  - 1))
txt = list('a' * d)
for i in range(d):
    txt[d - i - 1] = chr(ord(txt[d - i - 1])+(position % 26))
    position = position // 26
print(''.join(txt))

Solution (Python):
import math

n = int(input())
base = 26

digit = math.floor(math.log(1+(base-1)*n, base))
position = int(n - (base**digit - 1) / (base  - 1))

txt = 'a' * digit

txt = list(txt)

for i in range(digit):
    txt[digit - i - 1] = chr(ord(txt[digit - i - 1])+(position % base))
    position = position // base

print(''.join(txt))

Solution (Python):
import math


def nextString(text, p):
    if text[p] != 'z':
        text[p] = chr(ord(text[p])+1)
        return text
    else:
        text[p] = 'a'
        nextString(text, p - 1)

n = int(input())
base = 26

digit = math.floor(math.log(1+(base-1)*n, base))

position = int(n - (base**digit - 1) / (base  - 1))

txt = 'a' * digit

txt = list(txt)

for i in range(digit):
    txt[digit - i - 1] = chr(ord(txt[digit - i - 1])+(position % base))
    position = position // base

print(''.join(txt))

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

n_rem = n

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

    
    n_rem -= x
    n_rem //= 26

    
    if n_rem == 0:
        break


print(res[::-1])

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

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

n = int(input())
flag = 0

lm = []

while n >= 1:
    m = n % 26
    if m != 0:
        lm.insert(0, m)
        n = (n-m)//26
    else:
        lm.insert(0, 26)
        n = n//26 - 1
    flag += 1

l = []

for i in range(flag):
    l.append(la[lm[i]-1])


print(''.join(l))

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())
a,b=1,[1]
for i in [0]*12:
    a=26*a+1
    b.append(a)
c=13-sorted(b+[n],reverse=True).index(n)
a=n-b[c-1]
s=''
for i in [0]*c:
    s=chr(a%26+97)+s
    a=a//26
print(s)

Solution (Python):
abc=['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']
abc_n=[26,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]
S=""
n=int(input())
for i in range(0, 11):
    if (n//26)>=1:
        S+=abc[n%26]
        n=int((n-abc_n[n%26])/26)
    elif n==0:
        break
    else:
        S+=abc[n%26]
        break
        
print(S[::-1])

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

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

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

name = []
num = 0
while n > 0:
    n-=1
    res = chr(n % 26+ord('a'))
    name.insert(0,res)
    n = n//26

print(''.join(name))

Solution (Python):
import sys
input = sys.stdin.readline
import string
def main():
    def f(n):
        if n == -1:return
        a, b = divmod(n, 26)
        ans.append(string.ascii_lowercase[b])
        f(a-1)

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

Solution (Python):
N = int(input())
mapping = 'zabcdefghijklmnopqrstuvwxy'
res = []
for i in range(1, 99):
    if N <= 26 ** i:
        for j in range(i):
            N, r = divmod(N, 26)
            res.append(mapping[r])
            if r:
                N += 1
        break
    else:
        N -= 26 ** i
res.reverse()
print(''.join(res))

Solution (Python):
N = int(input())
alplha = ['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']
anslist = []
for k in range(10000):
    q = N//26
    r = N%26
    if r == 0:
        r = 26
        q -= 1
    anslist.append(alplha[r-1])
    N = q
    if q ==0:
        break

anslist.reverse()
ans = ''
for k in range(len(anslist)):
    ans += anslist[k]
print(ans)

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

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

print(f(n))

Solution (Python):
N,a=int(input()),''
while 0<N:N-=1;a+=chr(97+N%26);N//=26
print(a[::-1])

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

Solution (Python):
import string

n = int(input())

imanoatai = n

length = 0
cnt = 0
while True:
    length += 1
    cnt += 26 ** length
    if n <= cnt:
        break
    imanoatai -= 26 ** length

imanoatai -= 1
buf = []
for i in list(range(length))[::-1]:
    syou = imanoatai // 26**i
    amari = imanoatai % 26**i
    buf.append(syou)
    imanoatai = amari
    
for i in range(len(buf)):
    print(string.ascii_letters[buf[i]], end='')

Solution (Python):
def answer(n):
    if n <= 26:
        return chr(n-1 + 97)
    r = n % 26 - 1
    if r == -1:
        r += 26
    return answer((n-r) // 26) + chr(r + 97)


n = int(input())
print(answer(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:
    N -= 1
    ans.append(chr(ord('a') + N % 26))
    N = N // 26

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

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

print(ans[::-1])

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

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

    l = 0
    for i in range(1, 12):
        if N - 26 ** i > 0:
            N -= 26 ** i
            l = i
        else:
            break

    l += 1
    N -= 1

    if N == -1:
        N = 26**l - 1

    digi = list()
    for i in range(1, l + 1):
        r, m = divmod(N, 26)
        digi.append(m)
        N = r

    ans = ""
    for d in digi:
        ans += alpha[d]

    print(ans[::-1])

if __name__ == "__main__":
    main()

Solution (Python):
import string
import itertools
n = int(input())
s = n
l = list(string.ascii_lowercase)
count = 1
for i in range(1, 100):
    s -= 26 ** i
    if s <= 0:
        break
    else:
        count += 1
n_list = []
answer = []
for i in reversed(range(1, count+1)):
    number = min(26, n // 26 ** (i-1))
    n -= number * 26 ** (i-1)
    n_list.append(number)
n_l = []
for i, x in  enumerate(reversed(n_list)):
    if x <= 0:
        n_l.append(x + 26)
        n_list[-(i+2)] -= 1
    else:
        n_l.append(x)
for i in reversed(n_l):
    answer.append(l[i-1])
print(''.join(answer))

Solution (Python):
N = int(input())
li = list('abcdefghijklmnopqrstuvwxyz')
ans = []
count = 0
num = 0
i = 1
while count < N:
    count += 26 ** i
    num += 1
    i += 1
for j in range(1, num):
    N -= 26 ** j
N -= 1
for j in range(num):
    div, mod = divmod(N, 26)
    ans.append(li[mod])
    N = div
ans = ans[::-1]
for a in ans:
    print(a, end='')

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

ans_list = []
while True:
    N = N - 1
    mod = N % 26
    ans_list.append(resulter[mod])
    N = N // 26
    if N < 1:
        break

ans_list.reverse()
print("".join(ans_list))

Solution (Python):
N = int(input())
alphabet = [chr(i + ord('a')) for i in range(26)]

res = ""

while N > 0:
    N -= 1
    r = N % 26
    N //= 26
    res += alphabet[r]

print(res[::-1])

Solution (Python):
def dogs():
    number = int(input())
    l = list('abcdefghijklmnopqrstuvwxyz')
    dogName = []
    ans = ''

    while number > 0:
        number = number - 1
        dogName.append(l[number % 26])
        number = number // 26

    dogName.reverse()

    for i in dogName:
        ans = ans + i
    print(ans)


dogs()

Solution (Python):
import string

n = int(input())
s = string.ascii_lowercase
name = ''
while True:
    if n == 0:
        break
    n -= 1
    name += s[n % 26]
    n //= 26

print(name[::-1])

Solution (Python):

 
import sys
import string
def get_int(): return int(sys.stdin.readline().strip())
def get_ints(): return map(int, sys.stdin.readline().strip().split()) 
def get_list(): return list(map(int, sys.stdin.readline().strip().split())) 
def get_string(): return sys.stdin.readline().strip()
def out(data): return sys.stdout.write(str(data))
def out_list(arr): return sys.stdout.write(' '.join(str(e) for e in arr))

MAX = 10**9
MOD = 10**9 + 7

n = get_int()
alp = " "+string.ascii_lowercase
ans = ''

while n:
  ans = alp[(n-1)%26+1] + ans
  n = (n-1) // 26
print(ans)