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

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

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

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

def main():
    num = num2alpha(n)
    print(num.lower())
    return
main()

Solution (Python):
def printString(n): 
    string = ["0"] * 10000
    i = 0
  
    while n > 0: 
        rem = n % 26
        if rem == 0: 
            string[i] = 'Z'
            i += 1
            n = int(n / 26) - 1
        else: 
            string[i] = chr((rem - 1) + ord('A')) 
            i += 1
            n = int(n / 26)
    string[i] = '0'
    string = string[::-1] 
    ans = "".join(string) 
    for i in range(10000):
        if ans[i]!="0":
            break
    print(ans[i:].lower())
    
n=int(input())
printString(n)

Solution (Python):
import math
import time
from collections import defaultdict, deque
from sys import stdin, stdout
from bisect import bisect_left, bisect_right












def divmod_excel(n):
    a, b = divmod(n, 26)
    if b == 0:
        return a - 1, b + 26
    return a, b
import string
def to_excel(num):
    chars = []
    while num > 0:
        
        num, d = divmod_excel(num)
        chars.append(string.ascii_lowercase[d - 1])
    return ''.join(reversed(chars))
n=int(input())
print(to_excel(n))

Solution (Python):
from string import ascii_lowercase


def solve(N):
    """
    >>> solve(2)
    b
    >>> solve(27)
    aa
    >>> solve(703)
    aaa
    """
    q = N
    ret = ""
    while True:
        q, r = divmod(q - 1, 26)
        ret = ascii_lowercase[r] + ret
        if q == 0:
            print(ret)
            return


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


def _test():
    import doctest
    doctest.testmod()


if __name__ == "__main__":
    import sys
    argv = sys.argv
    if len(sys.argv) == 1:
        
        main()
    elif sys.argv[1] == "-t":
        _test()
    else:
        input = open(sys.argv[1]).buffer.readline

Solution (Python):
from collections import deque
n = int(input())
d = deque()
while(n):
    if(n%26 == 0):
        d.append("z")
        n = n//26 - 1
    else:
        d.append(chr(96+n%26))
        n//=26

while d:
    print(d.pop(),end="")

Solution (Python):
n = int(input())
kouho = []
alphabet = []
for i in range(26):
    alphabet.append(chr(ord("a") + i))
ans = []
while n > 0:
    p = (n) % 26
    q = n // 26
    if p == 0:
        p += 26
        q -= 1
    ans.append(alphabet[p - 1])
    n = q

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

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

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

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

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

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

print(str.lower(num2alpha(n)))

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

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

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

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

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

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

Solution (Python):
arp = list(" abcdefghijklmnopqrstuvwxyz")
ans = []
N = int(input())
while N != 0:
    K = N % 26
    if K == 0:
        K = 26
    ans.append(arp[K])
    N -= K
    N = N // 26
ans.reverse()
print("".join(ans))

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

i = 1
ans = []

while n > 0:
    tmp = n % 26
    if tmp == 0:
        tmp = 26
    ans.append(chr(tmp+96))
    n = (n-tmp)//26

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

Solution (Python):
import sys
readline = sys.stdin.buffer.readline
def even(n): return 1 if n%2==0 else 0

n = int(readline())
kijun = ord("a")
n -= 1 
ans = []
mod = 26
while True:
    ans.append(n%mod)
    if n < mod:
        break
    n //= mod
    n -= 1

res = ""
for i in ans:
    res += chr(kijun+i)

print(res[::-1])

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

Solution (Python):
def main():
    import sys
    input = sys.stdin.readline
    N = int(input())
    m = 26
    ans = ''
    n = N
    while n:
        ans += chr((n-1) % m + 97)
        n = (n-1) // 26
    print(ans[::-1])

if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
al=[chr(ord('a') + i) for i in range(25)]
al=['z']+al
ans=''
while n>0:
    ans=al[n%26]+ans
    if n%26==0:
        n=(n-1)//26
    else:
        n//=26
print(ans)

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

A = "\0abcdefghijklmnopqrstuvwxyz"

b = ""

while n != 0:
    c = n % 26
    if c == 0:
        c = 26
    b = A[c] + b
    n -= c
    n //= 26

print(b)

Solution (Python):
import string
abc = string.ascii_lowercase

N = int(input())

out = ''
while True:
    out += abc[(N-1)%26]
    N -= 1
    N /= 26
    N = int(N)
    if N<1:
        break
print(out[::-1])

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

Solution (Python):
n=int(input())
r=""
a = 1
b = 26
n -= a
while n>=0:
    c = chr(ord("a") + (n % b) // a)
    r = c + r
    a = b
    b *= 26
    n -= a
print(r)

Solution (Python):
import sys, bisect, math, itertools, heapq, collections
from operator import itemgetter

from functools import lru_cache

sys.setrecursionlimit(10**8)
input = sys.stdin.readline
INF = float('inf')
mod = 10**9 + 7
eps = 10**-7


def inp():
    '''
    一つの整数
    '''
    return int(input())


def inpl():
    '''
    一行に複数の整数
    '''
    return list(map(int, input().split()))


def str_inp():
    '''
    文字列をリストとして読み込む
    '''
    return list(input()[:-1])


n = inp()
ans = ""
while n:
    n -= 1
    tmp = n % 26
    n //= 26
    ans = chr(97 + tmp) + ans
print(ans)

Solution (Python):
num_to_alpha = "zabcdefghijklmnopqrstuvwxy"

n = int(input())

ans = []
while n:
    num = n % 26
    ans.append(num_to_alpha[num])
    if not num:
        n -= 1
    n //= 26

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

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

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

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

s = "abcdefghijklmnopqrstuvwxyz"
n = int(input())
res = ""

while n:
    if n % 26 == 0:
        res += "z"
    else:
        res += s[(n - 1) % 26]
    n = (n - 1) // 26

print(res[::-1])

Solution (Python):
n=int(input())
t="abcdefghijklmnopqrstuvwxyz"
def f(n):
  if n<=26:return t[n-1]
  return f((n-1)//26)+t[(n-1)%26]
print(f(n))

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

l=[]
while n>0:
  r=(n-1)%26+1  
  l.insert(0,chr(ord('a')+r-1))
  n=(n-1)//26
  
print(''.join(l))

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

Solution (Python):
import string
k=list(string.ascii_lowercase)
n=int(input())
l=[]
while n>0:
  l.append(n%26)
  n=(n-1)//26
l.reverse()
x=""
for i in l:
  x+=k[i-1]
print(x)

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

Solution (Python):
n = int(input())
name = ''
while n != 0:
    name += chr(ord('a') + (n - 1) % 26)
    n = (n - 1) // 26
print(''.join(reversed(name)))

Solution (Python):
N=int(input())
n=0
for i in range(1,15):
   if N<=(n+26**i):
       break
   else:
       n+=26**i


N-=n
N-=1

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"]
ans=""
for j in range(i):
    ans+=A[N//(26**(i-1-j))]
    N%=(26**(i-1-j))
print(ans)

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

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

Solution (Python):
import string

n = int(input())

m = len(string.ascii_lowercase)
chars = string.ascii_lowercase[-1] + string.ascii_lowercase[:-1]
result = ''
while n:
    tmp = n%m
    result = chars[tmp] + result
    if n <= m:
        break
    n = (n-1)//m

print(result)

Solution (Python):
import sys
import math

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

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

print(alphabet_decimal(int(input())))

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

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

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

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

def solve(N):
    res = []
    while N > 0:
        N -= 1
        res.append(N%26)
        N //= 26
    return ''.join(chr(ord('a')+v) for v in reversed(res))


print(solve(N))

Solution (Python):

from sys import stdin
input = stdin.readline
printn = lambda x: print(x,end='')
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
ins = lambda : input().strip()
DBG = True 
BIG = 10**18
R = 10**9 + 7

def ddprint(x):
  if DBG:
    print(x)

n = inn()
for i in range(1,20):
    if 26**i>=n:
        break
    else:
        n -= 26**i
n -= 1
s = []
for j in range(i):
    s.append(n%26)
    n //= 26
s.reverse()
print(''.join([chr(ord('a')+x) for x in s]))

Solution (Python):


import sys
read = sys.stdin.read
readline = sys.stdin.readline

n, = map(int,read().split())
n -= 1

k = 26
l = 1
while n >= k:
    n -= k
    k *= 26
    l += 1



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

s = "".join(map(lambda x: chr(x+ord("a")), r[::-1]))
print(s)

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

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

Solution (Python):
res = ""
n = int(input())
dig = -1

for i in range(20):
    n -= 26 ** i
    if n < 26 ** (i + 1):
        dig = i + 1
        break

for i in range(dig):
    res += chr(ord('a') + n % 26)
    n //= 26

print(res[::-1])

Solution (Python):
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")

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 ceil(x, y=1): return int(-(-x // y))
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
INF = 10 ** 18
MOD = 10**9+7


Ri = lambda : [int(x) for x in sys.stdin.readline().split()]
ri = lambda : sys.stdin.readline().strip()

n = int(ri())


arr = []
while n > 0:
    temp = n%26
    arr.append((temp-1)%26)

    if temp == 0:
        n= (n-1)//26
    else:
        n = n//26

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

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

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

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

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

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

l = 1
s = 0
while s <= n:
    s += pow(26, l)
    l += 1

l -= 1
s -= pow(26, l)

ans = ['a' for _ in range(l)]

dif = n - s
for i in range(l):
    tmp = pow(26, l - i - 1)
    ans[i] = chr(ord(ans[i]) + dif // tmp)
    dif %= tmp

print(''.join(ans))

Solution (Python):
import bisect
import copy
import heapq
import math
import sys
from collections import *
from functools import lru_cache
from itertools import accumulate, combinations, permutations, product
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
sys.setrecursionlimit(500000)
mod=pow(10,9)+7
al=[chr(ord('a') + i) for i in range(26)]
direction=[[1,0],[0,1],[-1,0],[0,-1]]

n=int(input())
ans=[]
while n:
    n-=1
    tmp=n%26
    ans.append(al[tmp])
    n//=26
ans.reverse()
print("".join(ans))

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

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

table = {c: n for c, n in enumerate("abcdefghijklmnopqrstuvwxyz")}

ans = ""
while n > 0:
    n -= 1
    ans = table[n % 26] + ans
    n //= 26

print(ans)

Solution (Python):
ans = []
n = int(input())
while(n!=0):
    x = n % 26
    n //= 26
    if x == 0:
        x = 26
        n -= 1
    ans.append(chr(96+x))

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

Solution (Python):

import bisect
import collections
import sys

sys.setrecursionlimit(1000000)
ACMOD = 1000000007
INF = 1 << 62


def solve(N: int):
    base = 26
    
    
    
    if N == 1:
        print("a")
        return
    rans = []
    for i in range(100000):
        if N == 0:
            break
        N -= 1
        if i == 0:
            rans.append(chr(N % base + ord('a')))
            N = N // base
        else:
            rans.append(chr((N) % base + ord('a')))
            N = N // base
    print("".join(reversed(rans)))
    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):
alpha = "abcdefghijklmnopqrstuvwxyz"
assert len(alpha) == 26


def solve(N):
    ans = []
    while N:
        N -= 1
        N, i = divmod(N, 26)
        ans.append(alpha[i])
    return "".join(ans[::-1])


(N,) = [int(x) for x in input().split()]
print(solve(N))

Solution (Python):
import sys
import  math
import fractions
from collections import defaultdict
stdin = sys.stdin
     
ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))

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

print(num2alpha(N).lower())

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

Solution (Python):
x = int(input())
base = 26
len = 1

while x > base:
    x -= base
    base = base * 26
    len += 1

ret = ""
subbase = base // 26
x -= 1
while subbase:
    c = x // subbase
    
    ret += chr(ord("a") + c)
    x -= subbase * c
    subbase //= 26
    
print(ret)

Solution (Python):
n = int(input())
nmax = 1000000000000001
alp = list("abcdefghijklmnopqrstuvwxyz")
ans = []
while n > 0:
    r = n%26
    if r == 0:
        r = 26
    n = (n-r)//26
    ans.append(alp[r-1])
print(''.join(ans[::-1]))

Solution (Python):
N=int(input())
N-=1
Z=26
Y=1
while Z<=N:
  N-=Z
  Z*=26
  Y+=1
P=''
for i in range(Y):
  P+=chr(ord('a')+N%26)
  N=N//26
print(P[::-1])

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

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 int_log(n, a):
  count = 0
  while n>=a:
    n //= a
    count += 1
  return count




N = I()
ans = []
while N:
  ans.append(N%26)
  N = (N-1)//26
  
print(*[AZ[i-1] for i in ans[::-1]],sep="")

Solution (Python):
def alpha2num(alpha):
    num=0
    for index, item in enumerate(list(alpha)):
        num += pow(26,len(alpha)-index-1)*(ord(item)-ord('A')+1)
    return num

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

if __name__ == "__main__":
    N = int(input())
    ans = num2alpha(N)
    print(ans)

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


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

print(num2alpha(N).lower())

Solution (Python):

from collections import deque, Counter
from heapq import heappop, heappush
from bisect import bisect_right

def main():
    N = int(input())
    a = 'zabcdefghijklmnopqrstuvwxy'
    ans = ''
    i = 0
    while N > 0:
        ans += a[N%26]
        N =  (N-1)//26
        
    print(ans[::-1])

if __name__ == "__main__":
    main()

Solution (Python):
def calc():
  n=int(input())
  arr=[]
  check='abcdefghijklmnopqrstuvwxyz'
  while n!=0:
    n-=1
    arr.append(check[n%26])
    n//=26
  arr=arr[::-1]
  print(''.join(map(str,arr)))
  
calc()

Solution (Python):
(N, ) = [int(n) for n in input().split()]

l = 1
d = 26
N -= 1
while d <= N:
    N -= d
    d *= 26
    l += 1
    
ans = []
for _ in range(l):
    ans.append(N % 26)
    N //= 26

print(''.join(chr(ord('a')+a) for a in reversed(ans)))

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

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

res = ""
if i ==1:
  print("a")
else:
  while i > 0:
    i-=1
    temp = i%26
    res = chr(97+temp) + res
    i = i//26

  print(res)

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

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

print(num2alpha(N).lower())

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

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

n = int(input())

print(num2alpha(n).lower())

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

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

Solution (Python):
ordA = ord('a')

N = int(input())

i = 1
acc = 0
while acc + 26**i < N:
    acc += 26**i
    i += 1



N -= acc + 1


anss = ''
for _ in range(i):
    no = N % 26
    anss += chr(ordA + no)
    N //= 26


print(anss[::-1])

Solution (Python):
alphabets = "abcdefghijklmnopqrstuvwxyz"

N = int(input())

c = 26
w = 1
n = N
while c < n:
	n -= c
	c *= 26
	w += 1



name = ""
n -= 1
for i in range(w):
	name = alphabets[n % 26] + name
	n //= 26

print(name)

Solution (Python):
import bisect
N = int(input())
D = [0]*12
SD = [0]*12
tmp = 26
for i in range(1, 12):
    D[i] = tmp
    SD[i] = SD[i-1] + D[i]
    if SD[i] > 1000000000000001:
        break
    tmp *= 26


L = bisect.bisect_left(SD, N)
alpha = 'abcdefghijklmnopqrstuvwxyz'
ans = []
N -= SD[L-1] + 1
for i in range(L):
    ans.append(alpha[N % 26])
    N //= 26


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

Solution (Python):
import sys
from string import ascii_lowercase as a2z

input = sys.stdin.readline


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

    i = 1
    min_v = 1
    max_v = 26
    while True:
        if N <= max_v:
            j = N - min_v
            ans = ""
            for _ in range(i):
                r = j % 26
                ans = "".join([a2z[r], ans])
                j = (j - r) // 26
            break
        min_v += 26 ** i
        i += 1
        max_v += 26 ** i

    print(ans)


if __name__ == "__main__":
    main()

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

Solution (Python):
"""
    こんにちは。これはクシャルです
    
    Author : thekushalghosh (クシャル)
    Team   : CodeDiggers
 
    I prefer Python language over the C++ language :p :D
        
    Visit my website : thekushalghosh.github.io
"""
import sys,math,cmath,time
start_time = time.time()



def qw(n):
    a = "abcdefghijklmnopqrstuvwxyz"
    if n == -1:
        return("")
    return(qw(n // 26 - 1) + a[n % 26])
def solve():
    n = inp()
    a = "abcdefghijklmnopqrstuvwxyz"
    q = qw(n - 1)
    print(q)
            


 
def main():
    global tt
    if not ONLINE_JUDGE:
        sys.stdin = open("input.txt","r")
        sys.stdout = open("output.txt","w")
    t = 1
    for tt in range(t):
        solve()
    if not ONLINE_JUDGE:
        print("Time Elapsed :",time.time() - start_time,"seconds")
        sys.stdout.close()
    

def inp():
    return(int(input()))
def inlt():
    return(list(map(int,input().split())))
def insr():
    return(input().strip())
def invr():
    return(map(int,input().split()))
 

def counter(a):
    q = [0] * (max(a) + 1)
    for i in range(len(a)):
        q[a[i]] = q[a[i]] + 1
    return(q)
 
def string_counter(a):
    q = [0] * 26
    for i in range(len(a)):
        q[ord(a[i]) - 97] = q[ord(a[i]) - 97] + 1
    return(q)


        
ONLINE_JUDGE = __debug__
if ONLINE_JUDGE:
    input = sys.stdin.readline
main()

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

ans = []
while N >= 1:
    N -= 1
    ans.append(chr(97 + N % 26))
    N //= 26
print(''.join(ans[::-1]))

Solution (Python):
import sys
from string import ascii_lowercase

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    N = int(readline())
    
    ans = []
    while N:
        N, r = divmod(N, 26)
        if r == 0:
            r = 26
            N -= 1
        ans.append(ascii_lowercase[r-1])
    
    print(''.join(reversed(ans)))
    return


if __name__ == '__main__':
    main()

Solution (Python):
n=int(input())
s=''
while n:
    n-=1
    s=chr(97+n%26)+s
    n//=26

print(s)

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

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

Solution (Python):
import string

alphabets = string.ascii_lowercase

N = int(input()) - 1

res = ""

while True:
    res += alphabets[N % 26]
    N //= 26
    N -= 1

    if N < 0:
        break

print(res[::-1])

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

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

print(solve(n).lower())

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