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

Solution (Python):

import math
import heapq, bisect
import sys
from collections import deque, defaultdict
from fractions import Fraction

mod = 10 ** 9 + 7
mod1 = 998244353


import os
import sys
from io import BytesIO, IOBase

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



class TreeNode:
    def __init__(self, k, v):
        self.key = k
        self.value = v
        self.left = None
        self.right = None
        self.parent = None
        self.height = 1
        self.num_left = 1
        self.num_total = 1


class AvlTree:

    def __init__(self):
        self._tree = None

    def add(self, k, v):
        if not self._tree:
            self._tree = TreeNode(k, v)
            return
        node = self._add(k, v)
        if node:
            self._rebalance(node)

    def _add(self, k, v):
        node = self._tree
        while node:
            if k < node.key:
                if node.left:
                    node = node.left
                else:
                    node.left = TreeNode(k, v)
                    node.left.parent = node
                    return node.left
            elif node.key < k:
                if node.right:
                    node = node.right
                else:
                    node.right = TreeNode(k, v)
                    node.right.parent = node
                    return node.right
            else:
                node.value = v
                return

    @staticmethod
    def get_height(x):
        return x.height if x else 0

    @staticmethod
    def get_num_total(x):
        return x.num_total if x else 0

    def _rebalance(self, node):

        n = node
        while n:
            lh = self.get_height(n.left)
            rh = self.get_height(n.right)
            n.height = max(lh, rh) + 1
            balance_factor = lh - rh
            n.num_total = 1 + self.get_num_total(n.left) + self.get_num_total(n.right)
            n.num_left = 1 + self.get_num_total(n.left)

            if balance_factor > 1:
                if self.get_height(n.left.left) < self.get_height(n.left.right):
                    self._rotate_left(n.left)
                self._rotate_right(n)
            elif balance_factor < -1:
                if self.get_height(n.right.right) < self.get_height(n.right.left):
                    self._rotate_right(n.right)
                self._rotate_left(n)
            else:
                n = n.parent

    def _remove_one(self, node):
        """
        Side effect!!! Changes node. Node should have exactly one child
        """
        replacement = node.left or node.right
        if node.parent:
            if AvlTree._is_left(node):
                node.parent.left = replacement
            else:
                node.parent.right = replacement
            replacement.parent = node.parent
            node.parent = None
        else:
            self._tree = replacement
            replacement.parent = None
        node.left = None
        node.right = None
        node.parent = None
        self._rebalance(replacement)

    def _remove_leaf(self, node):
        if node.parent:
            if AvlTree._is_left(node):
                node.parent.left = None
            else:
                node.parent.right = None
            self._rebalance(node.parent)
        else:
            self._tree = None
        node.parent = None
        node.left = None
        node.right = None

    def remove(self, k):
        node = self._get_node(k)
        if not node:
            return
        if AvlTree._is_leaf(node):
            self._remove_leaf(node)
            return
        if node.left and node.right:
            nxt = AvlTree._get_next(node)
            node.key = nxt.key
            node.value = nxt.value
            if self._is_leaf(nxt):
                self._remove_leaf(nxt)
            else:
                self._remove_one(nxt)
            self._rebalance(node)
        else:
            self._remove_one(node)

    def get(self, k):
        node = self._get_node(k)
        return node.value if node else -1

    def _get_node(self, k):
        if not self._tree:
            return None
        node = self._tree
        while node:
            if k < node.key:
                node = node.left
            elif node.key < k:
                node = node.right
            else:
                return node
        return None

    def get_at(self, pos):
        x = pos + 1
        node = self._tree
        while node:
            if x < node.num_left:
                node = node.left
            elif node.num_left < x:
                x -= node.num_left
                node = node.right
            else:
                return (node.key, node.value)
        raise IndexError("Out of ranges")

    @staticmethod
    def _is_left(node):
        return node.parent.left and node.parent.left == node

    @staticmethod
    def _is_leaf(node):
        return node.left is None and node.right is None

    def _rotate_right(self, node):
        if not node.parent:
            self._tree = node.left
            node.left.parent = None
        elif AvlTree._is_left(node):
            node.parent.left = node.left
            node.left.parent = node.parent
        else:
            node.parent.right = node.left
            node.left.parent = node.parent
        bk = node.left.right
        node.left.right = node
        node.parent = node.left
        node.left = bk
        if bk:
            bk.parent = node
        node.height = max(self.get_height(node.left), self.get_height(node.right)) + 1
        node.num_total = 1 + self.get_num_total(node.left) + self.get_num_total(node.right)
        node.num_left = 1 + self.get_num_total(node.left)

    def _rotate_left(self, node):
        if not node.parent:
            self._tree = node.right
            node.right.parent = None
        elif AvlTree._is_left(node):
            node.parent.left = node.right
            node.right.parent = node.parent
        else:
            node.parent.right = node.right
            node.right.parent = node.parent
        bk = node.right.left
        node.right.left = node
        node.parent = node.right
        node.right = bk
        if bk:
            bk.parent = node
        node.height = max(self.get_height(node.left), self.get_height(node.right)) + 1
        node.num_total = 1 + self.get_num_total(node.left) + self.get_num_total(node.right)
        node.num_left = 1 + self.get_num_total(node.left)

    @staticmethod
    def _get_next(node):
        if not node.right:
            return node.parent
        n = node.right
        while n.left:
            n = n.left
        return n
avl=AvlTree()

class SegmentTree1:
    def __init__(self, data, default='z', func=lambda a, b: min(a ,b)):
        """initialize the segment tree with data"""
        self._default = default
        self._func = func
        self._len = len(data)
        self._size = _size = 1 << (self._len - 1).bit_length()

        self.data = [default] * (2 * _size)
        self.data[_size:_size + self._len] = data
        for i in reversed(range(_size)):
            self.data[i] = func(self.data[i + i], self.data[i + i + 1])

    def __delitem__(self, idx):
        self[idx] = self._default

    def __getitem__(self, idx):
        return self.data[idx + self._size]

    def __setitem__(self, idx, value):
        idx += self._size
        self.data[idx] = value
        idx >>= 1
        while idx:
            self.data[idx] = self._func(self.data[2 * idx], self.data[2 * idx + 1])
            idx >>= 1

    def __len__(self):
        return self._len

    def query(self, start, stop):
        if start == stop:
            return self.__getitem__(start)
        stop += 1
        start += self._size
        stop += self._size

        res = self._default
        while start < stop:
            if start & 1:
                res = self._func(res, self.data[start])
                start += 1
            if stop & 1:
                stop -= 1
                res = self._func(res, self.data[stop])
            start >>= 1
            stop >>= 1
        return res

    def __repr__(self):
        return "SegmentTree({0})".format(self.data)



class SegmentTree:
    def __init__(self, data, default=0, func=lambda a, b: a * a + b * b):
        """initialize the segment tree with data"""
        self._default = default
        self._func = func
        self._len = len(data)
        self._size = _size = 1 << (self._len - 1).bit_length()

        self.data = [default] * (2 * _size)
        self.data[_size:_size + self._len] = data
        for i in reversed(range(_size)):
            self.data[i] = func(self.data[i + i], self.data[i + i + 1])

    def __delitem__(self, idx):
        self[idx] = self._default

    def __getitem__(self, idx):
        return self.data[idx + self._size]

    def __setitem__(self, idx, value):
        idx += self._size
        self.data[idx] = value
        idx >>= 1
        while idx:
            self.data[idx] = self._func(self.data[2 * idx], self.data[2 * idx + 1])
            idx >>= 1

    def __len__(self):
        return self._len

    def query(self, start, stop):
        if start == stop:
            return self.__getitem__(start)
        stop += 1
        start += self._size
        stop += self._size

        res = self._default
        while start < stop:
            if start & 1:
                res = self._func(res, self.data[start])
                start += 1
            if stop & 1:
                stop -= 1
                res = self._func(res, self.data[stop])
            start >>= 1
            stop >>= 1
        return res

    def __repr__(self):
        return "SegmentTree({0})".format(self.data)



class Factorial:
    def __init__(self, MOD):
        self.MOD = MOD
        self.factorials = [1, 1]
        self.invModulos = [0, 1]
        self.invFactorial_ = [1, 1]

    def calc(self, n):
        if n <= -1:
            print("Invalid argument to calculate n!")
            print("n must be non-negative value. But the argument was " + str(n))
            exit()
        if n < len(self.factorials):
            return self.factorials[n]
        nextArr = [0] * (n + 1 - len(self.factorials))
        initialI = len(self.factorials)
        prev = self.factorials[-1]
        m = self.MOD
        for i in range(initialI, n + 1):
            prev = nextArr[i - initialI] = prev * i % m
        self.factorials += nextArr
        return self.factorials[n]

    def inv(self, n):
        if n <= -1:
            print("Invalid argument to calculate n^(-1)")
            print("n must be non-negative value. But the argument was " + str(n))
            exit()
        p = self.MOD
        pi = n % p
        if pi < len(self.invModulos):
            return self.invModulos[pi]
        nextArr = [0] * (n + 1 - len(self.invModulos))
        initialI = len(self.invModulos)
        for i in range(initialI, min(p, n + 1)):
            next = -self.invModulos[p % i] * (p // i) % p
            self.invModulos.append(next)
        return self.invModulos[pi]

    def invFactorial(self, n):
        if n <= -1:
            print("Invalid argument to calculate (n^(-1))!")
            print("n must be non-negative value. But the argument was " + str(n))
            exit()
        if n < len(self.invFactorial_):
            return self.invFactorial_[n]
        self.inv(n)  
        nextArr = [0] * (n + 1 - len(self.invFactorial_))
        initialI = len(self.invFactorial_)
        prev = self.invFactorial_[-1]
        p = self.MOD
        for i in range(initialI, n + 1):
            prev = nextArr[i - initialI] = (prev * self.invModulos[i % p]) % p
        self.invFactorial_ += nextArr
        return self.invFactorial_[n]


class Combination:
    def __init__(self, MOD):
        self.MOD = MOD
        self.factorial = Factorial(MOD)

    def ncr(self, n, k):
        if k < 0 or n < k:
            return 0
        k = min(k, n - k)
        f = self.factorial
        return f.calc(n) * f.invFactorial(max(n - k, k)) * f.invFactorial(min(k, n - k)) % self.MOD



def powm(a, n, m):
    if a == 1 or n == 0:
        return 1
    if n % 2 == 0:
        s = powm(a, n // 2, m)
        return s * s % m
    else:
        return a * powm(a, n - 1, m) % m



def sort_list(list1, list2):
    zipped_pairs = zip(list2, list1)

    z = [x for _, x in sorted(zipped_pairs)]

    return z



def product(l):
    por = 1
    for i in range(len(l)):
        por *= l[i]
    return por



def binarySearchCount(arr, n, key):
    left = 0
    right = n - 1

    count = 0

    while (left <= right):
        mid = int((right + left)/ 2)

        
        
        if (arr[mid]<=key):
            count = mid+1
            left = mid + 1

        
        else:
            right = mid - 1

    return count



def countdig(n):
    c = 0
    while (n > 0):
        n //= 10
        c += 1
    return c


def countGreater( arr,n, k):
    l = 0
    r = n - 1

    
    
    leftGreater = n

    
    while (l <= r):
        m = int(l + (r - l) / 2)
        if (arr[m] >= k):
            leftGreater = m
            r = m - 1

        
        
        else:
            l = m + 1

    
    
    return (n - leftGreater)



n=int(input())
w=[chr(i) for i in range(97,123)]
w=w
ans=[]
while(n>0):
  t=n%26
  ans.append(w[n%26-1])
  n//=26
  if t==0:
      n-=1
ans=ans[::-1]
print(*ans,sep="")

Solution (Python):
if __name__ == "__main__":
    
    n = int(input())
    index = "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".split()

    s = ""
    m = n
    while True:
        o = m%26
        if m > 0 and o == 0:
            m -= 26
            o = 26
        s = index[o-1] + s
        m = m // 26
        if m == 0: break

    print(s)

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

print(ans[::-1])

Solution (Python):
n = int(input())
l = list()
name_dict = {0:'a', 1:'b', 2:'c', 3:'d', 4:'e', 5:'f', 6:'g', 7:'h', 8:'i', 9:'j', 10:'k', 11:'l', 12:'m', 13:'n', 14:'o', 15:'p', 16:'q', 17:'r', 18:'s', 19:'t', 20:'u', 21:'v', 22:'w', 23:'x', 24:'y', 25:'z'}
name = ''

while n != 0:
	n -= 1
	l.append(n%26)
	n = n//26

if l != []:
	for i in reversed(l):
		name += name_dict[i]

print(name)

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())
alpha = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']

def find_name(tmp_N, p, keta, alpha):
  if keta == 1:
    for i in range(len(alpha)):
      
      if tmp_N + (i+1) == N:
        p.append(i)
        return p
  else:
    for i in range(len(alpha)):
      if tmp_N + 26**(keta-1)*i+1 <= N <= tmp_N + 26**(keta-1)*(i+1):
        p.append(i)
        tmp_N = tmp_N + 26**(keta-1)*i
        keta -= 1
        return find_name(tmp_N, p, keta, alpha)
    

keta = 1
tmp_N = 0
while 1:
  if tmp_N + 1 <= N <= tmp_N + 26**keta:
    break
  else:
    keta += 1
    tmp_N += 26**(keta-1)


p = []
p = find_name(tmp_N, p, keta, alpha)
out = ''

for i in range(len(p)):
  out += alpha[p[i]]
print(out)

Solution (Python):
def find_j(h):
    p = []
    psum = 0
    for i in range(13):
        pi = 26**i
        psum += pi
        p.append(psum)
    
    n_p = len(p)
    for i in range(n_p):
        if p[i] > h:
            return i
    return 1

def find_k(h, j):
    n_block = 26**j
    
    for i in range(1,27):
        div_fin = n_block // 26 * i
        if h <= div_fin:
            return i

def main():
    n = int(input())
    
    alp_ = "abcdefghijklmnopqrstuvwxyz"
    alp = [alp_[i] for i in range(26)]
    
    h = n
    j = find_j(h)
    h = h - (26**j - 1)//25 + 1
    k = j
    ans = ""
    
    
    for _ in range(j):
        k = find_k(h, j)
        ans = ans + alp[k-1]
        h = h - 26**(j-1) * (k - 1)
        j -= 1
        
    
    print(ans)

if __name__ == "__main__":
    main()

Solution (Python):
def f(x):
    alp='abcdefghijklmnopqrstuvwxyz'
    keta=1
    saidai=26
    while saidai<x:
        keta+=1
        saidai+=26**keta
        
    out=[0]*keta
    for i in range(keta):
        x-=26**i
        
    for i in range(keta):
        tmp=x//26**(keta-i-1)
        out[i]+=tmp
        x-=tmp*26**(keta-i-1)
        
    out=[alp[out[i]] for i in range(keta)]
    return out

N=int(input())
print(''.join(f(N)))

Solution (Python):
n = int(input())
ans = str()
check = ["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"]

while n != 0:
    n -= 1
    ans += check[n%26]
    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):
def solve():
    N = int(input())
    ans = ""

    i = 1
    sub = 0
    while True:
        if N <= 26 ** i:
            N -= 1

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

        else:
            N -= 26 ** i
            
        i += 1
    
    print(ans[::-1])
        
if __name__ == '__main__':
    solve()

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

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

ans = ""
N -= 1
for i in range(s):
    ans += chr(ord("a") + N % 26)
    N = N // 26

print(ans[::-1])

Solution (Python):
N=int(input())
a=['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']

name=[]

for i in range (20):
    N=N-1
    name.insert(0,a[N%26])
    N=N//26
    if N==0:
        break

print(''.join(name))

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

a = {
    0: 'a', 1: 'b', 2: 'c', 3: 'd', 4: 'e', 5: 'f', 6:'g', 7: 'h', 8: 'i', 9: 'j', 10: 'k', 11: 'l', 12: 'm', 13: 'n',
    14: 'o', 15: 'p', 16: 'q', 17: 'r', 18: 's', 19: 't', 20: 'u', 21: 'v', 22: 'w', 23: 'x', 24: 'y', 25: 'z'
    }
m = []
q = N - 1
while True:
    q, mod = divmod(q, 26)
    m.append(a[mod])
    if q == 0:
        print(''.join(reversed(m)))
        exit()
    q -= 1

Solution (Python):
def nod(n) :
    i = 1
    while n > 26 ** i :
        n = n - 26 ** i
        i += 1
    return i
 
n = int(input())
i = nod(n)

demo = [26 ** j for j in range(12)]
demo1 = []
k = 0
for j in demo :
    k += j
    demo1.append(k)


n = n - demo1[i - 1] + 1


if n / 26 != n // 26 :
    i -= 1
    ans = []
    while i >= 0 :
        k = n // (26 ** i)
        n -= (26 ** i) * k
        if i > 0 :
            ans.append(chr(96 + k + 1))
        else :
            ans.append(chr(96 + k))
        i -= 1
    print(''.join(map(str,ans)))
else :
    i -= 1
    ans = []
    while i >= 0 :
        k = n // (26 ** i)
        n -= (26 ** i)*k
        if n > 0 :
            if i > 1 :
    
                ans.append(chr(96+k+1))
            elif i == 1 :
    
                ans.append(chr(96 + k))
            else :
                ans.append('z')
        else :
                ans.append(chr(96 + k))
                
                while i > 0 :
                    ans.append('z')
                    i -= 1
                break
        i -= 1
    print(''.join(map(str,ans)))

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

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

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

Solution (Python):
L=list()
def Base_10_to_n(X, n):
  X_dumy = X
  out = ''
  while X_dumy>0:
    L.append(str(X_dumy%n))
    X_dumy = int(X_dumy/n)
  return(L)
N=int(input())
L=Base_10_to_n(N, 26)
L=list(map(int,L))
for i in range(len(L)-1):
  if L[i]<=0:
    L[i]+=26
    L[i+1]=L[i+1]-1
if L[-1]==0:
  L.pop()
L=reversed(L)
R=["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"]
P=[R[i-1] for i in L]
print("".join(P))

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

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

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

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

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

ans = ""
N -= 1
for i in range(s)[::-1]:
    a = N // (26 ** i)
    N -= (26 ** i) * a
    ans += chr(ord("a") + a)
    
print(ans)

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())
ans=''
check='abcdefghijklmnopqrstuvwxyz'

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

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

Solution (Python):
def INPUT():return list(int(i) for i in input().split())

n=int(input())
ans=""
for i in range(1,14):
    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())
name=""
while N>0:
    N-=1
    name=chr(ord("a")+N%26)+name
    N//=26
print(name)

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

Solution (Python):


n = int(input())

def f(n):
  if n == 0:
    return ''
  n -= 1
  return f(n//26) + chr(ord('a') + (n%26))

print(f(n))

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

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

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

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.append(chr(ord('a') + n % 26))
    n //= 26

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

Solution (Python):
from string import ascii_lowercase as l
n=int(input())
j=1
answer=""
while n>26**j:
  n-=26**j
  j+=1
n-=1
for i in range(j):
  answer=l[n%26]+answer
  n//=26
print(answer)

Solution (Python):
from math import floor, log
def solve():
    N = int(input()) - 1
    
    ans = []

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

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

Solution (Python):
import sys

N = int(input())

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

ans = []

for i in range(11):
    N -= 1
    if N < 0:
        break
    ans.append(alpha[N % 26])
    N //= 26

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

Solution (Python):

n = int(input())
name = ''
count = 0

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


print(name[::-1])

Solution (Python):
from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
import itertools
from itertools import permutations, combinations, accumulate, product, combinations_with_replacement
import sys
import bisect
import string
import math
import time


def I(): return int(input())
def S(): return input()
def MI(): return map(int, input().split())
def MS(): return map(str, input().split())
def LI(): return [int(i) for i in input().split()]
def LI_(): return [int(i)-1 for i in input().split()]
def StoI(): return [ord(i)-97 for i in input()]
def ItoS(nn): return chr(nn+97)
def input(): return sys.stdin.readline().rstrip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def print_matrix(mat):
    for i in range(len(mat)):
        print(*['IINF' if v == IINF else "{:0=4}".format(v) for v in mat[i]])


yn = {False: 'No', True: 'Yes'}
YN = {False: 'NO', True: 'YES'}
MOD = 10**9+7
inf = float('inf')
IINF = 10**19
l_alp = string.ascii_lowercase
u_alp = string.ascii_uppercase
ts = time.time()
sys.setrecursionlimit(10**6)
nums = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']
show_flg = False


ret = []

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

def main():
    N = I()
    N -= 1

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

        ans = ''
        for j in range(i):
            r = N % 26
            N //= 26
            ans += l_alp[r]

        print(ans[::-1])
        break


if __name__ == '__main__':
    main()

Solution (Python):

import bisect
import heapq
import math
import random
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub


import sys


buff_readline = sys.stdin.readline
readline = sys.stdin.readline

INF = 2**62-1


def read_int():
    return int(buff_readline())


def read_int_n():
    return list(map(int, buff_readline().split()))


def read_float():
    return float(buff_readline())


def read_float_n():
    return list(map(float, buff_readline().split()))


def read_str():
    return readline().strip()


def read_str_n():
    return readline().strip().split()

def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(N):
    ans = []
    while N > 0:
        N -= 1
        c = N % 26
        ans.append(chr(ord('a')+c))
        N //= 26
    return ''.join(reversed(ans))


def main():
    N = read_int()
    print(slv(N))


if __name__ == '__main__':
    main()

Solution (Python):

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

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

n_rem = n
ans = ""

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

    n_rem -= x

    if n_rem == 0:
        break

    n_rem //=26

print(ans[::-1])

Solution (Python):
n = int(input())
name = ""
 
while(True):
  i = n % 26
  c = "zabcdefghijklmnopqrstuvwxyz"[i]
  name = c + name
  
  if(i==0):
    i=26
  n = int((n-i) / 26)
  if(n==0):
    break
    
print(name)