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())
ord_a = ord("a")
ans = ""
now = 26
prev = 0
e = 1
num = 0
while True:
    if now >= n:
        num = n - prev -1
        break
    e += 1
    prev = now
    now += 26 ** e
ans = ""
for i in range(e):
    res,mod = divmod(num,26)
    ans = chr(mod+ord_a) + ans
    num = res
print(ans)

Solution (Python):
s = [input() for i in range(1)] 
num = int(s[0])

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

Solution (Python):
N = int(input())
name = ''
while N>0:
    N, r = divmod(N-1, 26)
    name = chr(65+r)+name
print(name.lower())

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

ans = ''
while N:
    m = (N+25) % 26
    ans += chr(ord('a') + m)
    N = (N-m) // 26
print(ans[::-1])

Solution (Python):
n = int(input())
x = "abcdefghijklmnopqrstuvwxyz"
s = ""
while True:
  if n%26 == 0:
    s = "z"+s
    n -= 26
    n =n//26
  else:
    s = x[n%26-1]+s
    n = n//26
  if n==0:
    break
print(s)

Solution (Python):
tmp = "abcdefghijklmnopqrstuvwxyz"

current = int(input())
result = ""
while True:
    result += tmp[current % 26 - 1]
    current = (current - 1)// 26
    if current == 0:
        break

print(result[::-1])

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


dim = []
while n>0:
    q,r = divmod(n-1, 26)
    dim.append(r)
    n=q

import string
dic = {i:l for i,l in enumerate(string.ascii_lowercase)}

print(''.join([dic[d] for d in reversed(dim)]))

Solution (Python):
import sys
import math
def II():
	return int(sys.stdin.readline())

def LI():
	return list(map(int, sys.stdin.readline().split()))

def MI():
	return map(int, sys.stdin.readline().split())

def SI():
	return sys.stdin.readline().strip()
n = II()
ans = ""
while(n>0):
	ans+=chr(96+n%26) if n%26>0 else 'z'
	if n%26 == 0:
		n//=26
		n-=1
	else:
		n//=26
print(ans[:][::-1])

Solution (Python):
n = int(input())
n = n-1
alfabet = ["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 = []
while n>=0:
    a = n%26
    n = n//26-1
    ans.append(alfabet[a])

ans.reverse()
print("".join(ans))

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

ans = ""

digit_count = 1
check = 26

while N > check:
    digit_count += 1
    check += 26 ** digit_count

offset = check - 26 ** digit_count

N -= offset + 1

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

print(ans)

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

Solution (Python):
from pprint import pprint
import sys

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

ans = ""
while N:
    pos = (N - 1) % 26
    char = chr(ord("a") + pos)    
    ans = char + ans
    
    N = (N - 1) // 26

print(ans)

Solution (Python):
n=int(input())
l=list('abcdefghijklmnopqrstuvwxyz')
s=[]
i=1
while n>26**i:
  n-=26**i
  i+=1
n-=1
while i!=0:
  p=n//26**(i-1)
  n=n%26**(i-1)
  s.append(l[p])
  i-=1

print(''.join(s))

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

def callname(X):
    digits = 'abcdefghijklmnopqrstuvwxyz'
    if (int((X-1)/26)):
        return callname(int((X-1)/26))+digits[(X%26)-1]
    return digits[(X%26)-1]
print(callname(n))

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

str = "abcdefghijklmnopqrstuvwxyz"
rewsna = ""
while N > 0:
    rewsna += str[N%26-1]
    x = N%26
    if x == 0:
        N = (N-1)//26
    else:
        N = (N-x)//26

ans = ""

for i in range(len(rewsna)):
    ans += rewsna[len(rewsna)-i-1]

print(ans)

Solution (Python):
import sys
sys.setrecursionlimit(1000000000)
import math
from math import gcd
def lcm(a, b): return a * b // gcd(a, b)
from itertools import count, permutations, chain
from functools import lru_cache
from collections import deque, defaultdict
from pprint import pprint
ii = lambda: int(input())
mis = lambda: map(int, input().split())
lmis = lambda: list(mis())
INF = float('inf')
N1097 = 10**9 + 7

def meg(f, ok, ng):
    while abs(ok-ng)>1:
        mid = (ok+ng)//2
        if f(mid):
            ok=mid
        else:
            ng=mid
    return ok

def get_inv(n, modp):
    return pow(n, modp-2, modp)

def factorials_list(n, modp):    
    fs = [1]
    for i in range(1, n+1):
        fs.append(fs[-1] * i % modp)
    return fs

def invs_list(n, fs, modp):     
    invs = [get_inv(fs[-1], modp)]
    for i in range(n, 1-1, -1):
        invs.append(invs[-1] * i % modp)
    invs.reverse()
    return invs

def comb(n, k, modp):
    num = 1
    for i in range(n, n-k, -1):
        num = num * i % modp
    den = 1
    for i in range(2, k+1):
        den = den * i % modp
    return num * get_inv(den, modp) % modp

def comb_from_list(n, k, modp, fs, invs):   
    return fs[n] * invs[n-k] * invs[k] % modp



class UnionFindEx:
    def __init__(self, size):
        
        self.roots = [-1] * size
    def getRootID(self, i):
        r = self.roots[i]
        if r < 0:   
            return i
        else:
            r = self.getRootID(r)
            self.roots[i] = r
            return r
    def getGroupSize(self, i):
        return -self.roots[self.getRootID(i)]
    def connect(self, i, j):
        r1, r2 = self.getRootID(i), self.getRootID(j)
        if r1 == r2:
            return False
        if self.getGroupSize(r1) < self.getGroupSize(r2):
            r1, r2 = r2, r1
        self.roots[r1] += self.roots[r2]    
        self.roots[r2] = r1
        return True

Yes = 'Yes'
No = 'No'


def main():
    abc = [chr(i) for i in range(97, 97+26)]
    N=ii()
    ans = ''
    while N:
        N-=1
        ans = abc[N%26] + ans
        N //= 26
    print(ans)




main()

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

Solution (Python):
N = int(input())
name = ''
while N>0:
    N, r = divmod(N-1, 26)
    name = chr(65+r)+name
print(name.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):
n = int(input())
alph = "abcdefghijklmnopqrstuvwxyz"
num = 0
now = 1
keta = 0
while True:
    now *= 26
    keta += 1
    if num + now >= n:
        break
    num += now
ban = n - num - 1 
ans = ""
for i in range(keta):
    ban, mod = divmod(ban, 26)
    ans = alph[mod] + ans
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())
num2alpha = lambda c: chr(c+96)
li = []
while n>26:
    b = n%26
    n//=26
    if b==0:
        li.append("z")
        n-=1
    else:
        li.append(num2alpha(b))

if n<=26:
    li.append(num2alpha(n))

li.reverse()
print("".join(li))

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

Solution (Python):

N=int(input())
asci = 'abcdefghijklmnopqrstuvwxyz'
ans=[]
temp=N
while temp!=0:
    temp-=1
    ans.append(asci[temp%26])
    temp=temp//26
ans.reverse()
print(''.join(ans))

Solution (Python):
n = int(input())
x = ""
a = []
def abc(p):
    if p == 1:
        return "a"
    elif p == 2:
        return "b"
    elif p == 3:
        return "c"
    elif p == 4:
        return "d"
    elif p == 5:
        return "e"
    elif p == 6:
        return "f"
    elif p == 7:
        return "g"
    elif p == 8:
        return "h"
    elif p == 9:
        return "i"
    elif p == 10:
        return "j"
    elif p == 11:
        return "k"
    elif p == 12:
        return "l"
    elif p == 13:
        return "m"
    elif p == 14:
        return "n"
    elif p == 15:
        return "o"
    elif p == 16:
        return "p"
    elif p == 17:
        return "q"
    elif p == 18:
        return "r"
    elif p == 19:
        return "s"
    elif p == 20:
        return "t"
    elif p == 21:
        return "u"
    elif p == 22:
        return "v"
    elif p == 23:
        return "w"
    elif p == 24:
        return "x"
    elif p == 25:
        return "y"
    elif p == 0:
        return "z"
while n > 0:
    a.append(abc(n%26))
    n = (n-1)//26
for i in range(len(a)):
    x += a[-i-1]
print(x)

Solution (Python):
n_of_l=[26 ,702 ,18278 ,475254 ,12356630 ,321272406 ,8353082582 ,217180147158 ,5646683826134 ,146813779479510 ,3817158266467286]
n=int(input())
ans=''
flag=1
le=0
while flag:
  if n<=n_of_l[le]:
    flag=0
  le+=1
li='abcdefghijklmnopqrstuvwxyz'
n-=n_of_l[le-2]+1
for i in range(le):
  ans+=li[n%26]
  n//=26
print(ans[::-1])

Solution (Python):
def resolve():
    n=int(input())
    abcd = 'abcdefghijklmnopqrstuvwxyz'
    s=""
    while True:
        a=n%26
        if a==0:
            a=26
        s=abcd[a-1]+s
        n=int((n-a)/26)
        if n==0:
            break
    print(s)
resolve()

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

k=1

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

seq=[]
for i in range(k):
    seq.append(chr(ord("a")+n%26))
    n=n//26

seq.reverse()
s=""


for i in range(k):
    s+=seq[i]

print(s)

Solution (Python):

num = int(input())

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

print(n2a(num).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)


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

Solution (Python):
N = int(input())
li = []
while(1):
    i = N % 26
    if i == 0:
        i += 25
        N -=1
    else:
        i -=1
    li.append(chr(97 + i))
    N = N // 26
    if N == 0:
        break

li.reverse()
for i in range(len(li)):
    print(li[i], end="")

Solution (Python):
n=int(input())-1
a=[]
for i in range(20):
    a.append(chr(n%26+97))
    n//=26
    n-=1
    if n==-1:
        break
for i in range(len(a)):
    print(a[-1-i],end='')

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

N = int(input())

data = []

while N:
    next, mod = divmod(N - 1, 26)
    data.append(mod)
    N = next

data.reverse()

for i in data:
    print(chr(base + i), end="")

Solution (Python):
n = int(input())
L = []
while n > 0:
    m = n // 26
    l = n % 26
    if l == 0:
        L.append(26)
        n = m-1
    else:
        L.append(l)
        n = m


def num2alpha(c): return chr(c+64)


for i in range(len(L)):
    t = L[-i - 1]
    print(num2alpha(t).lower(), end='')

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 True:
    T = (N-1) % 26
    N = (N-1) // 26
    A.append(D[T])
    if N == 0:
        break
A = reversed(A)
print("".join(A))

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

m = N
x = 26
cnt = 0
while True:
    cnt += 1
    if m <= x:
        break
    m -= x
    x *= 26

m -= 1
ofs = ord('a')
c = []
while cnt:
    y = m % 26
    c.append(chr(y+ofs))
    m //= 26
    cnt -= 1


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

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

bit = []

for i in range(16):
    if N > 0:
        if N % 26 == 0:
            bit.append(26)
            N //= 26
            N -= 1
        else:
            bit.append(N % 26)
            N //= 26

appear = False
res = ""
for b in bit[::-1]:
    if (not appear) and b != 0:
        appear = True
    if appear:
        res = res + chr(96+b)

print(res)

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

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

Solution (Python):
def main():
    N = int(input())
    s = ""
    d = N
    while d:
        if d % 26 == 0:
            d, r = d // 26 - 1, 26
        else:
            d, r = d // 26, d % 26
        s += chr(r+64).lower()

    print("".join(list(reversed(s))))


if __name__ == '__main__':
    main()

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

def main():
    n = int(input())
    print(num2alpha(n).lower())

    
    
if __name__ == "__main__":
    main()

Solution (Python):
n=int(input())
l=[]
while n!=0:
    rem=n%26
    if rem==0:
        l.append('z')
        n=n//26
        n=n-1
    else:
        l.append(chr(97+(rem-1)))
        n=n//26
l.reverse()
print("".join(l))

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

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

Solution (Python):
n=int(input())-1
def n_len():
    global n
    i=1
    while n>=26**i:
        n-=26**i
        i+=1
    return i
l=n_len()
alp=[chr(i) for i in range(97, 97+26)]
ans=""
for i in range(l):
    k=n%26
    ans=alp[k]+ans
    n//=26
print(ans)

Solution (Python):

import sys

def converter(n):
    L ="zabcdefghijklmnopqrstuvwxy"
    return L[n]

def solve(N: int):
    ans = ""
    num = N
    while True:
        p = num // 26
        q = num % 26
        ans = converter(q) + ans
        if q == 0:
            p -= 1
        if p <= 0:
            break
        num = p

    print(ans)

    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):
n=int(input())
import sys
import math

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

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

print(alphabet_decimal(n))

Solution (Python):
n=int(input())
n-=1
ans=chr(n%26+97)

while(n):
    n//=26
    n-=1
    if n<0:
        break
    ans=chr(n%26+97)+ans
    
print(ans)

Solution (Python):



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

n = int(input())
a =[chr(ord('a') + i) for i in range(26)]
u = []
while n!=0:
    k = (n+25) % 26
    u.append(k)
    n = (n-1)//26
ans = []
for i in range(len(u)):
    ans.append(a[u[i]])
ans.reverse()
print("".join(ans))

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

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

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

Solution (Python):
N = int(input())
A = 'abcdefghijklmnopqrstuvwxyz'
assert len(A) == 26

def f(n):
  if n < 26:
    return [A[n % 26]]
  return f((n // 26) - 1) + [A[n % 26]]

print(''.join(f(N - 1)))

Solution (Python):
N = int(input())
def change(x):
    if x==0: x=26
    return chr(ord('a')+int(x)-1)
def helper(N,x):
    if N<=26: return change(N)
    if (int(N/x)):
        if N%x !=0:
            return helper(int(N/x),x)+change(N%x)
        else:
            return helper(int(N/x)-1,x)+change(N%x)
print(helper(N,26))

Solution (Python):
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N = int(read())

def main(N):
    A = [1]
    for _ in range(100):
        A.append(A[-1] * 26)
    for n in range(1, 100):
        
        if N > A[n]:
            N -= A[n]
            continue
        
        N -= 1
        ret = []
        for _ in range(n):
            N, r = divmod(N, 26)
            ret.append(r)
        break
    ret = [chr(ord('a') + x) for x in ret]
    return ''.join(reversed(ret))

print(main(N))

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

n = int(input())
print(create_alphabet(n))

Solution (Python):





import math
import fractions
import sys
import bisect
import heapq  
import collections
from collections import Counter
from collections import deque
import pprint

sr = lambda: input()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

"""nを素因数分解"""
"""2以上の整数n => [[素因数, 指数], ...]の2次元リスト"""


def factorization(n):
    arr = []
    temp = n
    if n == 1:
        return arr

    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 power(a, n, mod):
    x = 1
    while n:
        if n & 1:
            x *= a % mod
        n >>= 1
        a *= a % mod
    return x % mod



def kaijo(n, l, mod):
    if n == 0:
        return 1
    a = n
    tmp = n - 1
    while (tmp >= l):
        a = a * tmp % mod
        tmp -= 1
    return a


inf = 10 ** 18
mod = 10 ** 9 + 7

n = ir()
ans = []
while n > 0:
    tmp = n % 26
    ans.append(tmp)
    n = n // 26
    if tmp == 0:
        n-=1
a = []
for i, num in enumerate(ans):
    if num == 0:
        a.append('z')
    else:
        a.append(chr(ord('a') + num - 1))
a.reverse()
print(*a, sep='')

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())
u = num2alpha(n)
print(u.lower())

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

alpha = ['z'] + [chr(i) for i in range(ord('a'),ord('z')+1)]
step = 0
result = ''
while(True):
    t = n % 26
    result = alpha[t] + result
    if n <=26:
        break
    n //= 26
    if t == 0:
        n -= 1

print(result)

Solution (Python):
import string


def solve(n):
    digit = 1
    digit_sum = 0
    d = 0

    while n >= digit_sum:
        digit *= 26
        digit_sum += digit
        d += 1

    n -= (digit_sum - digit)

    ans = ''
    for _ in range(d):
        n, m = divmod(n, 26)
        ans += string.ascii_lowercase[m]

    return ans[::-1]


n = int(input())
print(solve(n - 1))

Solution (Python):
import string

def Getletterfromindex(num):

    num2alphadict = dict(zip(range(1, 27), string.ascii_lowercase))
    outval = ""
    numloops = (num-1) //26

    if numloops > 0:
        outval = outval + Getletterfromindex(numloops)

    remainder = num % 26
    if remainder > 0:
        outval = outval + num2alphadict[remainder]
    else:
        outval = outval + "z"
    return outval

num = int(input())

print(Getletterfromindex(num))

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 main():
    N = int( input())
    t = 26
    ANS = []
    a = ord("a")
    
    
    
    
    while True:
        
        
        
        ANS.append( chr((N-1)%t+a))
        N = (N-1)//t
        if N == 0:
            break
    print("".join( ANS[::-1]))
if __name__ == '__main__':
    main()

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

def c(n):
    return chr(ord('a') + n)

s = ""

for i in range(12):
    if N:
        N -= 1
        n = N % 26
        s = c(n) + s
        N //= 26
print(s)

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

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


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

print(num2alpha(n).lower())

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

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

print(henkan(n).lower())

Solution (Python):

ALPHABET = "abcdefghijklmnopqrstuvwxyz"
n = int(input()) - 1
ans = ""
while True:
    ans += ALPHABET[n % 26]
    n //= 26
    n -= 1
    if n < 0:
        break
print(ans[::-1])

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

TARGET = 1000000000000001
MAGIC_NUMBER = 1000

tab_pow = [0]
tmp = 0
for i in range(1, MAGIC_NUMBER + 1):
    if tab_pow[-1] >= TARGET: break
    tmp += 26 ** i
    tab_pow.append(tmp)


for n_dog in range(1, MAGIC_NUMBER + 1):
    if tab_pow[n_dog] > N - 1: break



ans = []
N = N - 1 - tab_pow[n_dog - 1]
step = 26 ** (n_dog - 1)
for i in range(n_dog):
    
    for j in range(26):
        if N < step:
            break
        else:
            N -= step
    
    ans.append(chr(ord('a') + j))
    step /= 26
        
ans = ''.join(ans)
print(ans)

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

    i = n%26
    if i == 0:i = 26
    n = (n-1) // 26
    mo = ord("a")+(i-1)

    ans = chr(mo) + ans
    if n == 0:
        break

print(ans)

Solution (Python):

n = int(input())
strr = []
i = 0
while n > 0:
    rem = n % 26
    if rem == 0:
        strr.append('z')
        n = (n // 26) - 1
    else:
        strr.append(chr((rem - 1) + ord('a')))
        n = n // 26
strr = strr[::-1]
print("".join(strr))

Solution (Python):
n = int(input())
n
ans = ''
st = 'abcdefghijklmnopqrstuvwxyz'
while n:
    idx = n%26
    if idx == 0:
        idx = 26
    ans += st[idx-1]
    if idx == 26:
        n-=26
    n//=26

print(ans[::-1])

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

Solution (Python):
N = int(input())
X_dumy = N
out = ''
while X_dumy > 0:
    out = chr(ord('a') + (X_dumy - 1) % 26) + out
    X_dumy = int((X_dumy - 1) / 26)

print(out)

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


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


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

if __name__ == '__main__':
    n = int(sys.stdin.readline().rstrip())
    ans = ''
    while True:
        n -= 1
        ans += chr(65+32+(n % 26))
        if n < 26:
            break
        n = n // 26
    print(ans[::-1])

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

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

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

Solution (Python):
N=int(input())
x=1
while 26**x<N:
    N-=26**x
    x+=1
a=[0]*x
N-=1
for i in range(x):
    a[i]=N//(26**(x-i-1))
    N%=(26**(x-i-1))
print(''.join([chr(c+ord('a')) for c in a]),sep='\n')

Solution (Python):
def colnum_string(n):
    string = ""
    while n > 0:
        n, remainder = divmod(n - 1, 26)
        string = chr(65 + remainder) + string
    return string.lower()
N = int(input())
print(colnum_string(N))

Solution (Python):
N = int(input())
temp = N
L = []

while temp != 0:
  temp -= 1
  a, b = divmod(temp, 26)
  temp = a
  L.append(chr(97+b))

L.reverse()

print("".join(L))

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


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


def main():
    n = int(input().strip())
    ans = ''
    while n != 0:
        if n % 26 == 0:
            ans = 'z' + ans
            n -= 26
            n = n // 26
        else:
            ans = chr(n % 26 + ord('a') - 1) + ans
            n = n // 26
    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))


alpha = 'abcdefghijklmnopqrstuvwxyz'
n = ii()
tmp = n
ans = ''
while tmp > 26:
    ans += alpha[tmp%26-1]
    if tmp%26 == 0:
        tmp //= 26
        tmp -= 1
    else:
        tmp //= 26


ans += alpha[tmp%26-1]
print(ans[::-1])

Solution (Python):
N = int(input())
if N<=26:
    print(chr(N+96))
else:
    s = ''
    tmp = N
    while True:
        ttmp = tmp%26
        if ttmp==0:
            ttmp = 26
        s = chr(ttmp+96)+s
        if tmp<=26:
            break
        tmp = (tmp-ttmp)//26
    print(s)

Solution (Python):
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): 
	return list(map(int,input().split()))
def m(): 
	return map(int,input().split())
def onem(): 
	return int(input())
def s(x): 
	a = []
	if len(x) == 0:
		return []
	aa = x[0]
	su = 1
	for i in range(len(x)-1):
		if aa != x[i+1]:
			a.append([aa,su])
			aa = x[i+1]
			su = 1
		else:
			su += 1
	a.append([aa,su])
	return a
def jo(x): 
	return " ".join(map(str,x))
def max2(x): 
	return max(map(max,x))
def In(x,a): 
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False

def pow_k(x, n):
    ans = 1
    while n:
        if n % 2:
            ans *= x
        x *= x
        n >>= 1
    return ans

"""
def nibu(x,n,r):
	ll = 0
	rr = r
	while True:
		mid = (ll+rr)//2

	if rr == mid:
		return ll
	if (ここに評価入れる):
		rr = mid
	else:
		ll = mid+1
"""

n = onem()
ans = ""
while True:
	if n <= 26:
		ans = chr(96+n) + ans
		break
	else:
		po = n % 26
		if po == 0:
			po = 26
		ans = chr(96+po) + ans
		n //= 26
		if po == 26:
			n -= 1
print(ans)

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

res = []
while N != 0:
    p = N % 26
    if p == 0:
        res.append('z')
        N = (N // 26) - 1
    else:
        res.append(chr(p + 96))
        N = N // 26

res.reverse()
result = ''.join(res)
print(result)

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

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


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)
kou=N
a= num2alpha(kou)   

print(a.lower())

Solution (Python):
n = int(input())
digits = []
while n > 0:
    r = n % 26
    if r == 0:
        r = 26
    c = chr(r + ord("a") - 1)
    digits.append(c)
    n = (n-1) // 26
digits.reverse()
print("".join(digits))

Solution (Python):
N = int(input())
ans = []
while(N != 0):
	N -=1
	ans.append(N % 26)
	N = N // 26
ans_str = ''
for i in range(len(ans)):
	ans_str+=chr(97 + ans[len(ans) - i - 1])
print(ans_str)

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)
c = int(input())
ans = num2alpha(c).lower()
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(str.lower(num2alpha(N)))

Solution (Python):


import sys
import math
import itertools
import collections

def solve(N):
    ans = ""
    while True:
        target = N % 26
        if target == 0:
            ans += "z"
            N = N//26 - 1
        else:
            ans+=chr(ord("a") - 1 + target)
            N //= 26
        if N == 0:
            break
    return ans[::-1]
def main():
    N = int(input())
    
    print(solve(N))

if __name__ == "__main__":
    main()

Solution (Python):



n = int(input())
_ = 96


ans = ''
while True:
  a, b = divmod(n, 26)
  
  if b == 0:
    b = 26
    a -= 1
  ans += str(chr(b + _))
  if a == 0:
    break
  n = a
  
print(ans[::-1])

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

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

print(ans)

Solution (Python):
def main():
    name = ['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())
    y = N
    ans = []
    for i in range(100):
        y -= 1
        x = y%26
        y = y//26
        ans.insert(0,name[x])
        if y == 0:
            break
    
    
    print(''.join(ans))
    
if __name__ == '__main__':
    main()