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

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

ans = ""

alp = "abcdefghijklmnopqrstuvwxyz"


ns = 0
k = 0
ans = ""
for keta in range(1,100):

    os = ns
    ns += 26**keta

    if ns >= N:

        N -= (os + 1)
        
        

        for i in range(keta-1,-1,-1):

            ans += alp[N // (26**i)]
            N %= 26**i

        print (ans)
        sys.exit()

Solution (Python):
def main():
    import string

    N = int(input())
    sb = []

    def rec(n):
        if 1 <= n <= 26:
            return string.ascii_lowercase[n-1]
        else:
            r = n%26
            q = n//26
            if r == 0:
                r = 26
                q -= 1
            return rec(q) + rec(r)

    print(rec(N))
 
 
if __name__ == '__main__':
    import sys
    sys.setrecursionlimit(10000)
    main()

Solution (Python):
n = int(input())
alp = "abcdefghijklmnopqrstuvwxyz"
def solve(n):
    if n<26:
        return [alp[n]]

    ans=[alp[(n%26)]]

    ans.extend(solve((n//26)-1))
    return ans


ans=solve(n-1)
ans.reverse()
print(*ans,sep="")

Solution (Python):
n = int(input())
i = 1
m = 0
alp = list(map(str,"abcdefghijklmnopqrstuvwxyz"))
ls = []
while True:
    if m + 26**i < n:
        m += 26**i
        i += 1
    else:
        break
ans = n-m
for ii in range(i):
    l = i-ii
    q = ans//(26**(l-1))
    if  ans/(26**(l-1)) % 1 != 0:
        q += 1
    ans -= q*(26**(l-1))
    ls.append(alp[q-1])
print("".join(ls))

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())
n_temp = n
index_pochi = []
eiji_list = [chr(ord('a') + i) for i in range(26)]
while(True):
    eiji = eiji_list[(n_temp-1)%26]
    index_pochi = [eiji] + index_pochi
    if int((n_temp-1)/26) == 0:
        break
    n_temp = int((n_temp-1)/26)
print("".join(index_pochi))

Solution (Python):
import math











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


N = int(input()) 
M = N
ans = []

while True:
  ans.append(alf[M % 26])
  if M % 26 == 0:
    M = M - 1
  if M <= 26:
    break
  M = math.floor(M / 26)

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

Solution (Python):

N = int(input())
MAX = 12
ecg = ['']*MAX

for i in range(MAX):
  sho = N % 26
  if(sho == 0):
    sho = 26
  ecg[i] = chr(sho + 96)
  N //= 26
  if(sho == 26):
    N -= 1
  if(N == 0):
    break

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

Solution (Python):
n=int(input())
ans,flag="",False
while n > 0 or not flag:
  s = (n-1) % 26
  ans += chr(97+s)
  n -= s
  n //= 26
  flag=True
print(ans[::-1])

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

Solution (Python):
import math
N = int(input())
character = list('abcdefghijklmnopqrstuvwxyz')
len_S = int(math.log(N*25+1, 26))
order = N - (26**(len_S)-1) / 25
ans = []
for i in range(len_S):
  c = int(order / 26 **(len_S-i-1))
  order -= 26 **(len_S-i-1) * c
  ans.append(character[c])
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)

N = int(input())

print(num2alpha(N).lower())

Solution (Python):
import math

N = int(input()) - 1
answer = ''
length = 0

for i in range(1, 12):
    num = 26 ** i 
    if N // num < 1:
        length = i
        break
    N -= num

for i in range(length):
    num = 26 ** (length - (i + 1))
    chara = chr(97 + N // num)
    answer += chara
    N -= num * (N // num)
print(answer)

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

Solution (Python):
def main():
    import sys
    def input(): return sys.stdin.readline().rstrip()
    n = int(input())
    count = 1
    k,l = 26,26
    while k < n:
        l *= 26
        k += l
        count += 1
    r = n - k + l -1
    s = ''
    for i in range(count):
        m = r%26
        r //= 26
        s += chr(ord('a')+ m)
    s = s[::-1]
    print(s)

if __name__ == '__main__':
    main()

Solution (Python):
import numpy as np




N = int(input())


def solve(N,K,d):
    a = K*26
    if (N <= a):
        s = ""
        s = chr((N-1)%26+97) + s
        N = int((N-1)/26)
        while (N > 0):
            s = chr((N)%26+97) + s
            N = int((N)/26)
        return ("{:a>" +str(d)+"}").format(s)
    else:
        return solve(N-a,a,d+1)

print(solve(N,1,1))

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

ans = []
while n != 0:
  c = n % 26
  ans.insert(0, alp[c-1])
  n //= 26
  if c == 0:
    n -= 1
  
print("".join(ans))

Solution (Python):
n = int(input())
alphabet = list("abcdefghijklmnopqrstuvwxyz")
if n <= 26:
    print(alphabet[n-1])
else:
    ans = ""
    while(True):
        q, mod = divmod(n, 26)
        if mod == 0:
            q -= 1
            ans = "z" + ans
        else:
            ans = alphabet[mod-1] + ans
        if q < 1:
            break
        n = q
    print(ans)

Solution (Python):
def itoa(i):
    return chr(97 + i)


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

    ans = ""
    while N:
        i = (N - 1) % 26
        N = (N - 1) // 26
        ans += itoa(i)

    print(ans[::-1])


if __name__ == "__main__":
    main()

Solution (Python):
n = int(input())
temp = 0
lowercase = 'abcdefghijklmnopqrstuvwxyz'
for i in range(1,13):
    temp += 26**i
    if n <= temp:
        break

diff = n - (temp - 26**i + 1)
ans = ''
for j in range(i):
    ans = lowercase[diff % 26] + ans
    diff = diff // 26
print(ans)

Solution (Python):
S=lambda:input()
I=lambda:int(input())
L=lambda:list(map(int,input().split()))
LS=lambda:list(map(str,input().split()))

from collections import deque

n=I()
s=deque()
abc=[chr(i) for i in range(97,123)]
sub=26
while n>0:
    dg=n%26
    n//=26
    if dg==0:
            n-=1
    s.appendleft(abc[dg-1])
for i in s:
    print(i,end="")
print()

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())
ans = []
while n > 26:
    
    if n % 26 == 0:
        ans.append(26)
    else:
        ans.append(n % 26)
    if n <= 26:
        break
    n = (n - 1) // 26
ans.append(n)
ans.reverse()

for i in ans:
    print(chr(i + 96), end='')

Solution (Python):
import math


def main():
    alphabets = [
        "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())

    i = 1
    r = ''
    while True:
        r = alphabets[math.ceil((n % (26 ** i)) / (26 ** (i - 1))) - 1] + r
        if n - 26**i > 0:
            n -= 26**i
            i += 1
        else:
            break

    print(r)


if __name__ == '__main__':
    main()

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

Solution (Python):
n=int(input())
ans=""
while 0 < n:
  d=n%26
  if d==0:
    d=26
  ans=chr(int(d)+96) + ans
  n=(n-d)/26
  
print(ans)

Solution (Python):
import math
data = input()
num = int(data)
alp = ["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"]
list = []
num2 = num

while num2 > 26:
    a = num2 % 26
    if a == 0:
        list.append(26)
        num2 -= 26
    else:
        list.append(a)
    num2 = math.floor(num2/26)
list.append(num2)
list.reverse()
ans = "a"
for i in list:
    ans = ans + alp[i-1]
print(ans[1:])

Solution (Python):
n = int(input())
d, m = divmod(n, 26)
ans = ""
if m == 0:
    ans += 'z'
    d -= 1
else:
    ans += chr(m+96)


while(not d==0):
    d, m = divmod(d, 26)
    if m == 0:
        ans += 'z'
        d -= 1
    else:
        ans += chr(m+96)


print(ans[::-1])

Solution (Python):
N = int(input())
D = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q',
     'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
a = 26
b = 1
while True:
    if N // (a + 1) == 0:
        break
    b += 1
    a += 26 ** b
A = [0] * b
for i in range(b):
    N -= 26 ** i
for i in range(b - 1, -1, -1):
    A[i] = N // (26 ** i)
    N -= A[i] * (26 ** i)
A = A[::-1]
for a in A:
    print(D[a], end='')
print('')

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

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

print(''.join(reversed(buf)))

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

        return ans.lower()

if __name__=="__main__":
        ans = main()
        print(ans)

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

if n == 1:
    print('a')
    exit()

def Find(value):
    i = 0
    accSum = 0
    while True:
        current = 26 ** i
        accSum += current
        if value < accSum:
            accSum -= current
            return i, accSum
        i+=1


maxI, accu = Find(n)

import string
alp = [chr(ord('a') + i) for i in range(26)]
s = ''
cur = n
for b in range(maxI):
    currentI = maxI - b

    diff = cur - accu
    ind = diff // (26 ** (currentI-1))
    s += alp[ind]

    accu += (26 ** (currentI - 1)) * ind

print(s)

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

ans = ""


while n > 0:
    x = n % 26
    if x == 0:
        ch = 'z'
        ans += ch
        n -= 1
        n //=26
        continue
    else:
        ch = chr(122-(26-x))
    ans += ch
    n //= 26
    

res = ''
for i in range(len(ans)-1, -1, -1):
    res+=ans[i]

print(res)

Solution (Python):
letters = 'abcdefghijklmnopqrstuvwxyz'

N = int(input())


def solve(n):
    result = ''
    while n > 0:
        letter_index = n % 26
        result = letters[letter_index-1] + result
        n //= 26
        if letter_index == 0:
            n -= 1

    print(result)


solve(N)

Solution (Python):
N = int(input())
ls = ['z','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y']
word = ''
while N != 0:
    word = ls[N%26] + word
    N = (N-1) // 26
print(word)

Solution (Python):
import sys

input = sys.stdin.readline


def S():
    return input().rstrip()


def I():
    return int(input())


def MI():
    return map(int, input().split())


def itoa(n):
    if n == 0:
        return "z"
    else:
        return chr(n + 96)


n = I()

ans = []
mod = 1
while n // 26 != 0:
    n, mod = divmod(n, 26)
    if mod == 0:
        n -= 1
    ans.append(itoa(mod))

if n == 0 and mod == 0:
    print("".join(ans[::-1]))
else:
    print(str(itoa(n % 26)) + "".join(ans[::-1]))

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

a = int(input())

c = 1
keta = 0
while True:
    if a < c:
        break
    else:
        a -= c
        c *= 26
        keta += 1

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

l = Base_10_to_n(a,26)


l2 = [chr(x + 65) for x in l]

st = "".join(l2).lower()

st = "a" * (keta-len(st)) + st

print(st)

Solution (Python):
n=int(input())
i=1
nn=n
while n>0:
    n-=26**i
    i+=1
k=i-1
n+=26**(i-1)
n-=1
s=[]
for j in range(k):
    k1=n//26**(k-j-1)
    n=n%26**(k-j-1)
    s.append(chr(k1+97))
for i in s:
    print(i,end='')

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):
import sys
from collections import deque
def input(): return sys.stdin.readline().strip()


def main():
    n = int(input())
    ans = deque([])
    while n > 0:
        rem = n % 26
        if rem != 0:
            ans.appendleft(chr(96 + n % 26))
            n = (n - rem) // 26
        else:
            ans.appendleft("z")
            n = (n - 26) // 26

    print("".join(ans))



if __name__ == "__main__":
    main()

Solution (Python):
N = int(input())
ans = ''
az = [chr(i) for i in range(97, 97+26)]
while N>0:
    r = N%26
    if r==0:
        ans+='z'
        N = (N-26)//26
    else:
        ans+=az[r-1]
        N = (N-r)//26
print(ans[::-1])

Solution (Python):
N = int(input())
N -= 1
ans = ""
base = ord("a")

while True:
    a = N % 26
    ans = chr(base+a) + ans
    if 0 <= N <= 25:
        break
    N = N // 26 - 1

print(ans)

Solution (Python):
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    N = int(input())

    ans = ''
    while N > 0:
        d, m = divmod(N, 26)
        if not m:
            d -= 1
            m = 26
        ans += chr(96 + m)
        N = d
    print(ans[::-1])


main()

Solution (Python):
def main():
    n = int(input())
    n -= 1
    
    s = []
    for _ in range(15):
        
        s.append(chr(ord('a')+(n%26)))
        n = int(n / 26)
        if n==0:
            break
        n -= 1
    s.reverse()
    print(''.join(s))

    pass

main()

Solution (Python):
n = int(input())
ans = []
while(True):
    if n <= 26:
        ans.append(chr(96+n))
        break
    n,a = divmod(n,26)
    if a == 0:
        ans.append('z')
        n -= 1
    else:
        ans.append(chr(96+a))
ans.reverse()
print(''.join(ans))

Solution (Python):

import sys
import math
import string

ALPHABET = string.ascii_lowercase
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):
X = input()
x = int(X)

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

ans = trans(x)
answer = ans.lower()
print(answer)

Solution (Python):
cnt=0
l=[]
for i in range(12):
    cnt+=26**i
    l.append(cnt)

n=int(input())
for i in range(12):
    if n>=l[i]:
        c=n-l[i]
        k=i+1



alp="abcdefghijklmnopqrstuvwxyz"
ans=""
for i in range(k):
    ans+=alp[c%26]
    c=c//26
    
print(ans[::-1])

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

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

Solution (Python):
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']
N = int(input())
ans = []
S = ''
while N != 0:
    ans.append(N%26)
    if N %26 == 0:
        N = N//26 - 1
    else:
        N = N//26
ans.reverse()
S = ''
for i in ans:
    S += A[i-1]
print(S)

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)
import bisect
import numpy as np
import math
from collections import deque
from collections import defaultdict
from math import gcd


N = int(input())
M = 1000000000000001

k = 3
mini = 26*(1 - 26**(k-1)) / (1 - 26) + 1
maxi = mini + 26**k - 1

for k in range(100):
    mini = 26*(1 - 26**(k-1)) / (1 - 26) + 1
    maxi = mini + 26**k - 1

    if mini <= N <= maxi:
        keta = k
        nunkome = N - mini
        break

import string
alphabets = string.ascii_letters 
characters = alphabets[:26]
def base_cvt(value, n=26):

    result = ''
    tmp = int(value)
    while tmp >= n:
        idx = tmp%n
        result =  characters[idx] + result
        tmp = int(tmp / n)
    idx = tmp%n
    result = characters[idx] + result
    return result

matsubi = base_cvt(nunkome)

num = k - len(matsubi)
print("a"*num + matsubi)

Solution (Python):


from collections import deque

num2alpha = lambda c: chr(c+64)

n = int(input())
ans_dq = deque()

for i in range(1,12):
    _tmp = n%26
    if _tmp == 0:
        _tmp = 26
        n = n//26 - 1
    else:
        n = n//26
    ans_dq.appendleft(num2alpha(_tmp).lower())
    if n == 0:
        break
print(*ans_dq, sep="")

Solution (Python):
N=int(input())
k=1
ans=""
num2alpha = lambda c: chr(c+96)


while(1):
    if(N<=((((26**k)-1)*26)/25)):
        break
    else:
        k+=1
X=int(N-((((26**(k-1))-1)*26)/25))-1


for i in range(k):
    x= int(X // (26**(k-1-i)))
    
    s=num2alpha(x+1)
    ans+=s
    X=X-x*(26**(k-1-i))
print(ans)

Solution (Python):
n=int(input())
alpha=list('abcdefghijklmnopqrstuvwxyz')

def sin(l):
    sinsu=[]
    m=l
    while(m>0):
        if(m%26==0):
            m-=1
            sinsu.append((m%26))
        else:
            sinsu.append((m%26)-1)
        m//=26

    
    ans=[]
    for i in range(len(sinsu)):
        ans.append(alpha[sinsu[i]])
    ans=ans[::-1]

    print(''.join(ans))

sin(n)

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

ans = str()
while N > 0:
    tmp = N % 26
    N //= 26
    if tmp == 0:
        tmp = 26
        N -= 1
    tmp += 96
    ans += chr(tmp)

print (ans[::-1])

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

for i in range(m-1):
    ans+=s[m-2-i]
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):
N = int(input())
final = ""
chars = "abcdefghijklmnopqrstuvwxyz"
dic = {i: chars[i] for i in range(0, 26)}
pw_26 = [26**i for i in range(13)]
cum = 0
digit = 0
for i in range(13):
    cum += pw_26[i]
    if N < cum:
        digit = i
        break
start_from = cum - pw_26[digit]
temp = N - start_from
digits = []
counter = 0
while counter < digit:
    res = temp % 26
    temp //= 26
    digits.append(res)
    counter += 1

for j in range(len(digits)):
    char = dic[digits[j]]
    final = char + final
print(final)

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

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

Solution (Python):
n=int(input())
m=n
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']
for i in range(1,12):
  n-=26**i
  if n<=0:
    count=i
    break
n=m

for i in range(1,count):
  n-=26**i
n-=1

B=[]
for i in range(count-1,0,-1):
  B.append(n//(26**i))
  n-=(n//(26**i))*(26**i)
B.append(n)

C=[]
for i in B:
  C.append(A[i])
print(''.join(C))

Solution (Python):
from math import log, ceil
def main():
    n = int(input())
    s = [chr(i) for i in range(ord('a'), ord('z')+1)]
    
    ans = ""
    m = ceil(log(25*n/26+1, 26))
    while(m>0 and n>0):
        m-=1
        if n%26==0:
            ans+=s[-1]
            n = n//26-1
        else:
            ans+=s[n%26-1]
            n = n//26
    print(ans[::-1])

    
        
        































































if __name__ == "__main__":
    main()

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):
n = int(input())
ans = ""
while n > 0:
    ans += chr((n-1)%26 + ord("A"))
    n = (n-1) // 26

print(ans.lower()[::-1])

Solution (Python):
n = int(input())
ketasuu = 1
keta=[]
for i in range(1,100):
         if n - (26 ** i) > 0:
                  ketasuu += 1
                  n -= 26 ** i
n = n -1
for i in range(ketasuu):
         keta.append(n % 26)
         n = n // 26
keta = list(reversed(keta))
alphaketa=[]
for i in range(len(keta)):
         alphaketa.append(chr(keta[i] + 97))
ans = "".join(alphaketa)
print(ans)

Solution (Python):
N = int(input())
res = ""
char = dict(enumerate("zabcdefghijklmnopqrstuvwxy"))

while N > 0:
    
    res = char[N % 26] + res
    if N % 26 == 0:
        N = N // 26 - 1
    else:
        N //= 26

print(res)

Solution (Python):
alpha = 'abcdefghijklmnopqrstuvwxyz'
N= int(input())
len_alpha = 26
tmp = N
calc = tmp
cnt = 1

while tmp > 0:
    calc = tmp
    tmp -= (len_alpha **cnt)
    cnt += 1

res =''
for i in range(1, cnt - 1):
    tmp = int((calc-1)/(len_alpha**(cnt - i - 1)))
    calc -= tmp * len_alpha**(cnt - i - 1)
    res += alpha[tmp]

res += alpha[calc-1]
print(res)

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

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

N = int(input())
print(number(N))

Solution (Python):


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

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

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']
ans = ''

stop = False

while not stop: 
  if (n-1) // 26 >= 1:
    ans += name[(n-1) % 26]
    n = (n-1) // 26
  else:
    ans += name[n-1]
    stop = True

r_ans = ans[::-1]

print(r_ans)

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

cnt = 0
n = 0
while n >= 0:
    if N > cnt:
        n += 1
        cnt += 26**n
    else:
        break
aToz = ['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']

number = N - (cnt - 26**n) - 1
ans = ""
for i in range(n):
    str = aToz[number % 26]
    ans += str
    number = number // 26
print(ans[::-1])

Solution (Python):
n=int(input())
al=[chr(97+i)for i in range(26)]
ans=""
while n>0:
    ans+=str(al[n%26-1])
    if n%26==0:
        n=n//26-1
    else:n//=26    
print(ans[::-1])

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

print(alp(N).lower())

Solution (Python):
import sys











sys.setrecursionlimit(10**6)
input = sys.stdin.readline


numbers = "0123456789"
characters = ['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 base_cvt(value:int, n=26):
    quot = value//n
    rest = value%n
    base = characters[rest]
    tmp = quot
    while quot >= 1:
        quot = (tmp-1)//n
        rest = (tmp-1)%n
        base = characters[rest] + base
        tmp = quot
    return base

def main():
    N = int(input())
    ans = base_cvt(N-1)
    print(ans)

if __name__ == "__main__":
    main()

Solution (Python):
N = int(input())
name = []
while N > 0:
    name.append((N - 1) % 26)
    N -= 1
    N //= 26
name.reverse()
ans = "".join(chr(ord("a") + x) for x in name)
print(ans)

Solution (Python):
import string

N = int(input())

alphabet = string.ascii_lowercase

return_str = ''

while N > 0:
    digit = (N-1) % 26
    return_str += alphabet[digit]
    N = (N - digit) // 26

print(return_str[::-1])

Solution (Python):
import string

asc = string.ascii_lowercase
N = int(input())
name = ""
tmp = N - 1
div = 1
while div > 0:
  div = tmp // 26
  mod = tmp % 26
  tmp = div - 1
  name = asc[mod] + name

print(name)

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

while(n > 0):
    a = n % 26
    n = n //26
    for i in range(26):
        if a == i:
            ans += al[i]
    if a == 0:
        
        n = n - 1

ans = ans[::-1]

print(ans)

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 = ""
s = True
while s:
  a = N % 26
  if a == 0:
    a = 25
  else:
    a -= 1
  name = A[a] + name
  N = (N - a) // 26
  if N == 0:
    s = False

print(name)

Solution (Python):
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

n = ii()

al = [1]
nc = 0

def ntow(x):
    if x == 0:
        return 'z'
    v = chr(ord('a')+x-1)
    
    return v

for i in range(1,15):
    nc += 26 ** i
    al.append(nc+1)
    if nc > 1000000000000001:
        break



for i in range(15):
    if n < al[i]:
        keta = i
        break


ans = ''

for i in range(keta):
    tmp = 26**(i+1)
    
    nk = n%tmp
    if nk == 0:
        ans =  'z' + ans
        n -= tmp
    else:
        
        ans =  ntow(nk//(26**i)) + ans
        n -= nk

print(ans)

Solution (Python):

import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

N=int1(input())
ans=[]
a=ord('a')
z=26
c=1
while N>=z:
    N-=z
    z*=26
    c+=1
while N:
    b=N%26
    ans.append(chr(b+a))
    if N<26:
        break
    N//=26
for _ in range(c-len(ans)):
    ans.append('a')
ans.reverse()
print(''.join(ans))

Solution (Python):
N = int(input())
al = [chr(i) for i in range(97, 97+26)]
ans = ""
while True:
    temp = N % 26
    ans = al[temp-1] + ans
    if N // 26 == 0:
        break
    else:
        if N == 26:
            break
        if N % 26 == 0:
            N = N // 26 - 1
        else:
            N = N // 26

print(ans)

Solution (Python):
N = int(input())
a = 1
ans = ''
abc = [chr(ord('a') + i) for i in range(26)]
while N>26**a:
  N -= 26**a
  a += 1
ans += abc[N%26-1]
if a >= 2:
  N = (N-1)//26
for i in range(a-1):
  ans += abc[N%26]
  N = N//26
print(ans[::-1])

Solution (Python):
A='abcdefghijklmnopqrstuvwxyz'
n=int(input())-1
p=26
d=1
while n>=p:
    n-=p
    p*=26
    d+=1
ans=[None]*d

for i in range(d):
    ans[d-i-1]=A[n%26]
    n//=26
print(*ans,sep='')

Solution (Python):
a = int(input())
counter = 1
sum_num = 26 ** counter
before_sum_num = 0

while True:
  if a <= sum_num:
    a -= before_sum_num
    a -= 1
    for i in range(counter, 0, -1):
      z = a // (26 ** (i - 1))


      a = a % (26 ** (i-1))
      print(chr(ord('a') + z), end='')
    break

  else:
    before_sum_num = sum_num
    counter += 1
    sum_num += 26 ** counter

print()

Solution (Python):
from string import ascii_lowercase

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

while n != 0:
    name = ascii_lowercase[(26 if n % 26 == 0 else (n % 26)) - 1] + name
    n -= (26 if n % 26 == 0 else (n % 26))
    n //= 26

print(name)

Solution (Python):

import sys


def f(x):
    ans = chr(x[0] + ord('a') - 1)
    

def solve(N: int):
    '''
    >>> solve(1)
    'a'
    >>> solve(26)
    'z'
    >>> solve(18278)
    'zzz'
    >>> solve(475255)
    'aaaaa'
    '''
    ans = []
    n = N
    while n > 0:
        ans.append((n-1)%26)
        n = (n-1) // 26
    return "".join(map(lambda x: chr(x+ord('a')), reversed(ans)))



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    print(solve(N))

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

if __name__ == '__main__':
    test()
    main()