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())
ans = 0
for i in range(1,12):
    num = (26**i)
    ans += num
    if ans == n:
        print("z"*i)
        exit()
res1,res2 = divmod(n,26)
res = ""
if res1 < 1:
    res = chr(res2+96)
elif res1>26:
    while n>0:
        div,mod = divmod(n,26)
        if mod==0:
            res += 'z'
            n = (n//26)-1
        else:
            res += chr(mod+96)
            n //= 26 
    res = res[::-1]
else:
    res += chr(res1+96)+chr(res2+96) if res2>0 else chr(res1+95)+"z"
print(res)

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


l=[0]
s=0

for i in range(1,20):
    s+=26**i
    l.append(s)
    if N <= s:
        break
x=N-l[-2]-1

ans=[0]*i
for j in range(i):
    q=x//26
    r=x%26
    x=q
    ans[-(j+1)]=alp[r]
print(''.join(ans))

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

Solution (Python):
n=int(input())
ans=""
l=["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","z"]
ans=""
while n>0:
    ans=l[(n%26)]+ans
    if n%26==0:
        n-=1
    n//=26
print(ans)

Solution (Python):
import string

N = int(input())
al = string.ascii_lowercase

s = ''
num = 26
while N > 26:
    amari = N % num
    N //= 26
    if (amari == 0):
        N -= 1
    if (amari == 0):
        s += al[25]
    else:
        s += al[amari - 1]
if (N == 0):
    s += al[25]
else:
    s += al[N - 1]
print(s[::-1])

Solution (Python):
n = int(input())
x = [chr(i) for i in range(ord("a"), ord("z")+1)]
ans = []
while n > 26:
    ans.append(x[n%26-1])
    if n%26 == 0:
        n = n//26 -1
    else:n //= 26
ans.append(x[n-1])
print("".join(ans[::-1]))

Solution (Python):
from bisect import bisect_left
n = int(input())
lis = [0]*13
for i in range(1,13):
   lis[i] = 26**i + lis[i-1]

num = bisect_left(lis,n)
n -= lis[num-1]
n -= 1
ans = ''
for i in range(num):
   i = num-i-1
   ans += chr(n//(26**i) +97)
   n %= 26**i
print(ans)

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

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

alp = 'abcdefghijklmnopqrstuvwxyz'

num = [26**i for i in range(1, 15)]

n1 = 0
n2 = 0

for i, n in enumerate(num):
    n1 += n
    if n1 >= N:
        n3 = N - n2
        k = i + 1
        break
    n2 = n1

ans = ''

if n3 % 26 == 0:
    n3 = n3-1
    for i in range(k):
        i = k-i-1
        if i == 0:
            ans += 'z'
            break
        if  n3 == 26**(i+1):
            ans += 'z'*(i+1)
            break
        n = n3 // 26**i
        n3 %= 26**i
        ans += alp[n]
else:        
    for i in range(k):
        i = k-i-1
        if i == 0:
            ans += alp[n3-1]
            break
        if  n3 == 26**(i+1):
            ans += 'z'*(i+1)
            break
        n = n3 // 26**i
        n3 %= 26**i
        ans += alp[n]

print(ans)

Solution (Python):
def base_convert(nl, ibase, obase):
    o = []
    while any(nl):
        c = 0
        for i in range(len(nl)):
            c = c * ibase + nl[i]
            nl[i], c = divmod(c, obase)
        o.append(c)
    o.reverse()
    return o


N = list(str(int(input())))
N = list(map(int, N))
p = base_convert(N, 10, 26)

ans = []
for _ in range(len(p)):
    for i in range(len(p)):
        if p[i] == 0 and i != 0:
            p[i - 1] -= 1
            p[i] = 26


pp = []
for i in range(len(p)):
    if p[i] != 0:
        pp.append(p[i])

ans = [chr(ord("a") + i - 1) for i in pp]
print("".join(ans))

Solution (Python):
N=int(input())
l=["a","b","c","d","e","f","g","h","i","j","k","l","m",
   "n","o","p","q","r","s","t","u","v","w","x","y","z"]
Ans=[]
s=0
for i in range(11):
    s+=26**i
    S=s+26**(i+1)
    if s<=N<S:
        I=i
        break
for i in range(I+1):
    N-=26**i
while I>=0:
    for i in range(0,26):
        n=N-26**I*i
        if n<26**I:
            Ans.append(l[i])
            N=n
            I-=1
            break
print("".join(Ans))

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

out = ''
tmp = n
r = 1
c = 0
count = 1
while True:
    r *= 26
    
    
    if tmp > c+r:
        c += r
        count += 1
    else:
        break

tmp = n - c - 1



while tmp>0:
    out = s[tmp%26]+out
    tmp = int(tmp/26)

for _ in range(count-len(out)):
    out = 'a'+out

print(out)

Solution (Python):
n = int(input())
mod = 26
x = 1
l = list()
while True:
    if n <= mod:
        for i in range(x):
            l.append(n%26)
            n = n//26
        break
    else:
        n -= mod
        mod *= 26
        x += 1
l.reverse()

l2 = list()







if l.count(0) == x:
    print("z"*x)
    exit()
for i in range(x-1):
    l[i] += 1
for i in range(x-1,-1,-1):
    if l[i] == 0:
        l[i-1] -= 1
        l[i] = 26
for i in range(len(l)):
    l2.append(chr(l[i]+96))
print("".join(l2))

Solution (Python):
list = [0,'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']
num_list =[0]
for i in range(1,15):
    num_list.append(26**i+num_list[i-1])

n = int(input())
i = 0
while True:
    if num_list[i] >= n:
        break
    else:
        i +=1


word = []
for j in range(i,0,-1):
    x = n//26**(j-1)
    if x==27:
        word.append(26)
        n = n -26**(j-1)*(n//26**(j-1))+26**(j-1)
    else:
        word.append(x)
        n = n -26**(j-1)*(n//26**(j-1))
while True:
    if 0 in word:
        p = word.index(0)
        word[p-1] = word[p-1]-1
        word[p] = 26
    else:
        break
h =''
for k in range(len(word)):
    h+=str(list[word[k]])
print(h)

Solution (Python):
"""
クアドリアンとダルメシアン（自然言語）
入力：自然数N
出力：a-zを使用した文字列
手続き
1. 入力を受け取る
2. N-1を26で割った商をd, 余りをrとする
3. 文字列a-zの内r番目の文字列をresに格納する
4. Nにdを代入して，手続き2.に戻る
5. resに格納した文字列を反転させ，出力する
"""
import string
N = int(input())
def convert_26_decimal(N):
    res = ""
    d, r = 0, 0
    while N:
        d, r = (N-1)//26, (N-1)%26
        res += string.ascii_lowercase[r]
        N = d
    return res[::-1]
print(convert_26_decimal(N))

Solution (Python):
n = int(input())
l = [0]
ans = []
a = 0
cur = 1
while a < 1000000000000001:
  a += 26**cur
  cur += 1
  l.append(a)
l = list(reversed(l))
for i in range(len(l)-1):
  if l[i] >= n:
    ans.append(0)
  else:
    div = min((n-l[i+1]-1)//(l[i]-l[i+1]),26)
    n = n-div*(l[i]-l[i+1])
    ans.append(div)
ans.append(n)
ans =list(map(lambda x:x+96, ans))
for i in range(len(ans)):
  if ans[i] > 96:
    ans2 = ans[i:]
    break
ans2 = "".join([chr(i) for i in ans2])
print(ans2)

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

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

def kyusu(n):
    return 26 * (26 ** n - 1) / 25

t = 1
while(N > kyusu(t)):
    t += 1

keta = []
for i in range(t - 1):
    base = 26 ** (t - i - 1)
    extra = kyusu(t - i - 1)
    tmp = math.ceil((N - extra) / base)
    keta.append(alphabet[tmp - 1].lower())
    N -= base * tmp

answer = ""
for i in range(len(keta)):
    answer += keta[i]

answer += alphabet[N - 1].lower()
print(answer)

Solution (Python):
import string

N = int(input())
al = string.ascii_lowercase

















s = ''
num = 26
while N > 26:
    amari = N % num
    N //= 26
    if (amari == 0):
        N -= 1
    if (amari == 0):
        s += al[25]
    else:
        s += al[amari - 1]
if (N == 0):
    s += al[25]
else:
    s += al[N - 1]
print(s[::-1])

Solution (Python):
n = int(input())
res = n % 26

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 = []
while n//26 > 0 :
  res = n % 26
  if res != 0:
    ans.append(A[res-1])
    n = n // 26
  elif res == 0:
    ans .append(A[25])
    n = n // 26 -1

if n != 0:
  ans.append(A[n-1])

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

Solution (Python):


import sys
























from itertools import accumulate             






def main():
    mod = 1000000007                
    inf = float('inf')              
    
    sys.setrecursionlimit(10**6)    
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def isp():   return input().split()
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())

    def convert_to_alpha(num):
        return chr(ord('a') + num - 1)    
    
    n = ii()
    memo = [pow(26, i+1) for i in range(20)]
    accum = list(accumulate(memo))
    least = list(accumulate([pow(26, i) for i in range(20)]))
    digit = 0
    for i in range(20):
        if accum[i] >= n:
            digit = i
            break
    L = []
    
    for i in range(digit, -1, -1):
        
        if i == 0:
            assert 1 <= n <= 26
            if n == 26:
                L.append('z')
            else:
                L.append(convert_to_alpha(n))
            break
        
        assert accum[i-1] <= n <= accum[i]
        if n >= pow(26, i+1) + least[i-1]:
            L.append('z')
            n -= pow(26, i+1)
        else:
            q = (n - least[i-1]) // pow(26, i)
            res = n - q * pow(26, i)
            if res < least[i-1]:
                q -= 1
            if q == 26:
                L.append('z')
            else:
                L.append(convert_to_alpha(q))
            n = res
        


    print(''.join(L))


if __name__ == "__main__":
    main()

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

n -= 1

cnt = 1
num = 26
name = ''
anum = 97

while n >= num:
    name += chr(n%num+anum)
    n = int(n/26)
    n -= 1

name += chr(n%num+anum)

name = name[::-1]

print(name)

Solution (Python):
N = int(input())
c = 0
P = [N]

alph = {}
p = 1
for i in range(97, 97+26):
    alph[str(p%26)] = chr(i)
    p += 1

ans = []
k = 0
T = N
while(N > 0):
    if k == 0:
        ans.append(alph[str((N // (26**k))%26)])
    else:
        ans.append(alph[str(((N-1)//(26**k)+1)%26)])
    k += 1
    N -= 26**k
print("".join(ans[::-1]))

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

num = []

while n >= 26:
    num.append(n % 26)
    n = n // 26 - 1

num.append(n)
num.reverse()

ans = []
for numi in num:
    ans.append(chr(numi + 97))

print(''.join(ans))

Solution (Python):
X = input()
a = ""
y = int(X)
while y > 0:
    i = int(y % 26)
    if i == 0:
        a = "z" + a
        y = y - 26
    else:
        a ='abcdefghijklmnopqrstuvwxy'[i-1] + a
        y = y - i
    y = y / 26
print (a)

Solution (Python):
"""
    Satwik_Tiwari ;) .
    20 june , 2020  - Tuesday
"""



from __future__ import division, print_function

from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase


import bisect
from heapq import *
from math import *
from collections import deque
from collections import Counter as counter  
from itertools import combinations as comb 
from itertools import permutations as permutate
from bisect import bisect_left as bl


from bisect import bisect_right as br
from bisect import bisect





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


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)






mod = 1000000007
def inp(): return sys.stdin.readline().rstrip("\r\n") 
def out(var): sys.stdout.write(str(var))  
def lis(): return list(map(int, inp().split()))
def stringlis(): return list(map(str, inp().split()))
def sep(): return map(int, inp().split())
def strsep(): return map(str, inp().split())
def graph(vertex): return [[] for i in range(0,vertex+1)]
def zerolist(n): return [0]*n
def nextline(): out("\n")  
def testcase(t):
    for p in range(t):
        solve()
def printlist(a) :
    for p in range(0,len(a)):
        out(str(a[p]) + ' ')
def lcm(a,b): return (a*b)//gcd(a,b)
def power(a,b):
    ans = 1
    while(b>0):
        if(b%2==1):
            ans*=a
        a*=a
        b//=2
    return ans
def ncr(n,r): return factorial(n)//(factorial(r)*factorial(max(n-r,1)))
def isPrime(n) : 
    if (n <= 1) : return False
    if (n <= 3) : return True
    if (n % 2 == 0 or n % 3 == 0) : return False
    i = 5
    while(i * i <= n) :
        if (n % i == 0 or n % (i + 2) == 0) :
            return False
        i = i + 6
    return True




def base(n,x):
    a = []
    while(n!=0):
        a.append((n%26))
        n = n//26

    if(len(a) < x):
        while(len(a) !=x):
            a.append(0)
    a = a[::-1]
    return a

def solve():
    n = int(inp())
    a = []
    for i in range(1,27):
        a.append(chr(96+i))

    x = 1
    rem = 0
    while((26**x)+rem < n):
        rem+=26**x
        x+=1
        


    n = n - rem
    temp = base(n-1,x)
    
    ans =''
    for i in range(0,len(temp)):
        ans += a[temp[i]]
    print(ans)


testcase(1)

Solution (Python):
def change_n_shinsu(x, n):
    ans = []
    while True:
        shou = x // n
        amari = x % n
        if shou == 0 and amari == 0:
            break
        ans.append(amari)
        x = shou
    
    return ans

n = int(input())

lst = [26]
for i in range(100):
    lst.append(lst[-1]*26)

ruiseki = [26]
for i in range(1, 100):
    ruiseki.append(ruiseki[-1]+lst[i])

keta = 1
while n > ruiseki[keta-1]:
    keta += 1

if keta == 1:
    print(chr(n+ord('a')-1))
    exit()

n -= ruiseki[keta-2]+1

sin = change_n_shinsu(n, 26)
while len(sin) < keta:
    sin.append(0)
sin = sin[::-1]

ans = ''
for i in range(keta):
    ans += chr(sin[i]+ord('a'))

print(ans)

Solution (Python):
import sys, re
import math
from decimal import Decimal
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul	
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd	
from heapq import heappush, heappop

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.maxsize = 10 ** 15
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7


n = INT()
alphabet = "abcdefghijklmnopqrstuvwxyz"
ans = ""

def A(value):
    global alphabet, ans
    if value <= 26:
        ans += alphabet[value - 1]
        print(ans[::-1])
    else:
        a = value % 26
        ans += alphabet[a - 1]
        if a == 0:
            A( math.floor(Decimal(value - 2) / Decimal(26)) )
        else:
            A( math.floor(Decimal(value) / Decimal(26)) )
A(n)

Solution (Python):
def Base_10_to_n(X, n):
    X_dumy = X-1
    alpha=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
    out = []
    while X_dumy>=0:
      out.insert(0,alpha[(X_dumy%n)])
      X_dumy = int(X_dumy/n)-1
    return out

N=int(input())
c=Base_10_to_n(N,26)
c=''.join(c)
print(c)

Solution (Python):
N = int(input())
name = ""
tempN = N
while tempN > 0:
    num = tempN % 26
    if num == 0:
        num = 26
    name += chr(num + 96)
    tempN = (tempN - num)//26

print(name[::-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())
ans = []

while N > 26:
    if N % 26 == 0:
        ans.insert(0,chr(122))
        N = N // 26-1
    else:
        ans.insert(0,chr(N%26+96))
        N = N // 26
ans.insert(0,chr(N+96))

print("".join(ans))

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

fase = 0
idx = 0
for i in range(1, 20):
  N -= 26**i
  if N <= 0:
    fase = i
    idx = 26**i - abs(N)
    break

ans = ''
for i in range(1, fase+1):
  q = idx / (26**(fase-i))
  mod = idx % (26**(fase-i))
  if mod == 0:
    mod = 26**(fase-i)
  if q <= 1:
    ans += 'a'
  elif q <= 2:
    ans += 'b'
  elif q <= 3:
    ans += 'c'
  elif q <= 4:
    ans += 'd'
  elif q <= 5:
    ans += 'e'
  elif q <= 6:
    ans += 'f'
  elif q <= 7:
    ans += 'g'
  elif q <= 8:
    ans += 'h'
  elif q <= 9:
    ans += 'i'
  elif q <= 10:
    ans += 'j'
  elif q <= 11:
    ans += 'k'
  elif q <= 12:
    ans += 'l'
  elif q <= 13:
    ans += 'm'
  elif q <= 14:
    ans += 'n'
  elif q <= 15:
    ans += 'o'
  elif q <= 16:
    ans += 'p'
  elif q <= 17:
    ans += 'q'
  elif q <= 18:
    ans += 'r'
  elif q <= 19:
    ans += 's'
  elif q <= 20:
    ans += 't'
  elif q <= 21:
    ans += 'u'
  elif q <= 22:
    ans += 'v'
  elif q <= 23:
    ans += 'w'
  elif q <= 24:
    ans += 'x'
  elif q <= 25:
    ans += 'y'
  elif q <= 26:
    ans += 'z'
  idx = mod

print(ans)

Solution (Python):
N = int(input())
alphabet = "zabcdefghijklmnopqrstuvwxy"
num = N
cnt = 0
div = 26
res = ""
while True:
  
  sho = num // div
  amari = num % div
  
  
  res += alphabet[amari]
  if amari != 0:
    num = sho
  else:
    num = sho -1
  if sho == 0:
    break
  elif sho == 1 and amari == 0 and alphabet[amari] == "z":
    break
print(res[::-1])

Solution (Python):
import sys
from collections import defaultdict
readline = sys.stdin.buffer.readline



def geta(fn=lambda s: s.decode()):
    return map(fn, readline().split())


def gete(fn=lambda s: s.decode()):
    return fn(readline().rstrip())


def main():
    n = gete(int)
    ans = ""

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


if __name__ == "__main__":
    main()

Solution (Python):
alpha = 'abcdefghijklmnopqrstuvwxyz'

n = int(input())
ans =''
a = []
while n > 0:
    t = n%26-1
    if t < 0:
        t = 25
    a.append(t)
    n -= t+1
    n //= 26
a.reverse()
for i in a:
    ans += alpha[i]
print(ans)

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

a=0
b=-1
c=[]
while b!=0:
  a=n%26
  b=n//26
  n=b
  
  c.append(a)

for i in range(0,len(c)-1):
  if c[i]==0 or c[i]==-1:
    c[i]+=26
    c[i+1]-=1


ss=""
for i in reversed(range(len(c))):
  if ss=="" and c[i]==0:
    continue
  ss+=chr(96+c[i])
  
print(ss)

Solution (Python):
N = int(input())
al=[chr(ord('a') + i) for i in range(26)]
out = []
while N>=1:
    X = N%26
    out.append(X-1)
    if X==0:
        N = (N-26)//26
    else:
        N = (N-X)//26
S = ""
for i in range(len(out)):
    S += al[out[len(out)-1-i]]
print(S)

Solution (Python):
N = int(input())
alphabet_lst = list('abcdefghijklmnopqrstuvwxyz')


keta = 0
keta_lst = []
sum_lst = []
while N>=sum(keta_lst):
    keta_lst.append(26**keta)
    sum_keta = sum(keta_lst)
    sum_lst.append(sum_keta)
    keta += 1
    
keta -= 1
keta_lst = keta_lst[:keta]



ans_lst = []
for i in range(keta):
    ans_n = (N - sum(keta_lst[:-(i+1)])) // keta_lst[-(i+1)]
    
    
    N -= ans_n*keta_lst[-(i+1)]
    ans_lst.append(alphabet_lst[ans_n-1])

for i in range(keta):
    print(ans_lst[i],end="")

Solution (Python):
N = int(input())
line = [ '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']
output =""
while True:
    if N == 0:
        break
    if (int(N/26)):
        output = line[(N%26) -1] + output
        if N%26 == 0:
            N = int((N-1)/26)
        else:
            N = int(N/26)
    
    else:
        output = line[(N%26) -1] + output
        break
print(output)

Solution (Python):
n = int(input())
ans = ''
alf = ['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' ]
order = 0
def func(m):
    return int(26 * (26**m-1) / 25 + 0.5)

for i in range(11, 0, -1):
    if n > func(i):
        n = n-func(i)
        order = i
        break
for i in range(order, 0, -1):
    if n % 26**i == 0:
        m = n//(26**i) - 1
        n -= m * 26 ** i
        ans += alf[m]
    
    
    else:
        m = n // 26**i
        n %= 26**i
        ans += alf[m]
ans += alf[n-1]
print(ans)

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

    ans = []
    while n > 0:
        n, mod = divmod(n, 26)
        if mod == 0:
            ans.append(26)
            n -= 1
        else:
            ans.append(mod)

    ans.reverse()

    for i in range(len(ans)):
        if ans[i] == 0:
            pass
        else:
            print(chr(96+ans[i]), end='')
    print()

resolve()

Solution (Python):
n = int(input())
d = [26**i for i in range(15)]
for i in range(14):
    d[i+1] += d[i]
for i in range(14):
    if d[i]<=n<d[i+1]: break
ans = ""
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']

res = n-d[i]
for i in range(i+1):
    r = res//(26**i)
    ans += a[(r%26)]
print(ans[::-1])

Solution (Python):
N = int(input())
ans = []
i = 1
while True:
    if N > 26 ** i:
        N -= 26 ** i
        i += 1
    else:
        break

N = N-1


for j in range(i):
    a = N // (26 ** (i-j-1))
    ans.append(a)
    N -= (26 ** (i-j-1)) * a

ch = ['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']
dic = {}
for i in range(26):
    dic[i+1] = ch[i]

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

print(''.join(ans))

Solution (Python):
import copy
N = int(input())
keta = 1
n = copy.deepcopy(N)
flag = True
while flag:
    if n-1 >= 26**keta:
        n -= 26**keta
        keta += 1
    else:
        flag = False
for i in range(1, keta):
    N -= 26**i
alph = 'abcdefghijklmnopqrstuvwxyz'
ans = []
ans.append(alph[(N%26)-1])
for i in range(1, keta):
    num = (N-1)//(26**i)
    if num ==0:
        ans.append("a")
    else:
        ans.append(alph[(num%26)])
ans.reverse()
print("".join(ans))

Solution (Python):
N = int(input())
lst = []
for i in range(1,12):
    if N <= 26 :
        lst.append(N % 26)
        break
    lst.append(N % 26)
    if N % 26 == 0:
        N = N // 26 - 1
    else:
        N = N // 26

chr = 'abcdefghijklmnopqrstuvwxyz'
res = ""
for j in lst:
    res = chr[j-1] + res
print(res)

Solution (Python):
n=int(input())
s = ""
cons = 96

if n%26:
    s+=chr(cons + n%26)
else:
    n-=1
    s+="z"
n = n//26

while n:
    if n%26:
        s+=chr(cons + n%26)
    else:
        n-=1
        s+="z"
    n = n//26
    
print(s[::-1])

Solution (Python):
N = int(input())
s = ""
words = "abcdefghijklmnopqrstuvwxyz"
while N > 0:
    if N%26 == 0:
        amari = 26
    else:
        amari = N%26
    if N > 26:
        N = (N-amari)/26
    else:
        N = N-26
    s = words[int(amari-1)]+s
print(s)

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

alphbet = lambda c: chr(c+64)

def Base_10_to_n(X, n):
    X_dumy = X
    out = []
    while X_dumy > 0:
      if X_dumy % n == 0:
        out.append( 26 )
        X_dumy = int(X_dumy / n - 1)
      else:
        out.append( X_dumy % n )
        X_dumy = int(X_dumy / n)
    return out
if 1 <= x <= 1000000000000001:
    out = Base_10_to_n(x, 26)[::-1]
    print( "".join(alphbet(i) for i in out).lower())

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

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

def b26(X, n):
    X_dumy = X
    out = ''
    while X_dumy>0:
        if X_dumy%26==0:
            out=str(26)+' '+out
            X_dumy=int(X_dumy/n)-1
        else:
            out = str(X_dumy%n)+' '+out
            X_dumy = int(X_dumy/n)
    return out

for a in b26(N,26).split():
    print(chr(96+int(a)),end='')
print('')

Solution (Python):
n = int(input())
ans = ''
while True:
    q, mod = divmod(n, 26)
    if mod == 0:
        ans = 'z' + ans
        q -= 1
    else:
        ans = (chr(ord('a') + mod-1)) + ans
    if q == 0:
        break
    else:
        n = q
print(ans)

Solution (Python):
N = int(input())
alphabet_lst = list('abcdefghijklmnopqrstuvwxyz')


keta = 0
keta_lst = []
sum_lst = []
while N>=sum(keta_lst):
    keta_lst.append(26**keta)
    sum_keta = sum(keta_lst)
    sum_lst.append(sum_keta)
    keta += 1
    
keta -= 1
keta_lst = keta_lst[:keta]



ans_lst = []
for i in range(keta):
    ans_n = (N - sum(keta_lst[:-(i+1)])) // keta_lst[-(i+1)]
    
    
    N -= ans_n*keta_lst[-(i+1)]
    ans_lst.append(alphabet_lst[ans_n-1])

for i in range(keta):
    print(ans_lst[i],end="")

Solution (Python):
num = int(input())
strng = ""
while num >= 1 :
    kalan = num % 26
    if(kalan==0):
      strng = "z" +strng
    else:
    	strng = chr(96+kalan)+strng
    num-=1
    num = num // 26
print(strng)

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

dividend = n
columnName = ''
modulo = 0

while dividend > 0:
    modulo = (dividend - 1) % 26
    columnName = chr(97 + modulo) + columnName
    dividend = int((dividend - modulo) / 26)
print(columnName)

Solution (Python):
MAX = 50
  


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

Solution (Python):
N = int(input())
ans = []
while N > 26:
    if N % 26 == 0:
        ans.append(26)
        N -= 26
    else:
        ans.append(N % 26)
    N //= 26
ans.append(N)
moji = ''
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)
for a in ans[::-1]:
    moji += num2alpha(a)
print(moji.lower())

Solution (Python):
from sys import stdin, setrecursionlimit


a_list = 'abcdefghijklmnopqrstuvwxyz'


def base_convert(nl, ibase, obase):
    o = []
    while any(nl):
        c = 0
        for i in range(len(nl)):
            c = c * ibase + nl[i]
            nl[i], c = divmod(c, obase)
        o.append(c)
    o.reverse()
    return o


def main():
    input = stdin.buffer.readline
    N = int(input())
    if N == 1:
        print('a')
    else:
        arr = [1]
        tmp = 1
        while arr[-1] <= 1000000000000001:
            tmp *= 26
            arr.append(tmp)
        k = 0
        while N >= arr[k]:
            N -= arr[k]
            k += 1
        n = [int(i) for i in list(str(N))]
        idx = base_convert(n, 10, 26)
        idx = [0] * (k - len(idx)) + idx
        print(*[a_list[i] for i in idx], sep='')


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()

Solution (Python):
n=int(input())
al=[chr(ord('a') + i) for i in range(26)]
sakai=[]
k=0
for i in range(10):
  k+=26**(i+1)
  sakai.append(k)

if n<=26:
  n-=1
  u=1
elif n>sakai[9]:
  n-=sakai[9]+1
  u=11
for i in range(9):
  if (sakai[i]<n<=sakai[i+1]):
    n-=sakai[i]+1
    u=i+2

def base(n):
  ans=[]
  while(n>=26):
    r=n%26
    n=(n-r)//26
    ans.append(r)
  ans.append(n)
  return ans


p=base(n)

if u-len(p)>0:
  ans_3='a'
  if u-len(p)>1:
    for j in range(u-len(p)-1):
      ans_3+='a'
    
for i in range(len(p)):
  if i==0:
    ans_2=al[p[len(p)-i-1]]
  else:
    ans_2=ans_2+al[p[len(p)-i-1]]
if u-len(p)>0:
  print(ans_3+ans_2)
else:
  print(ans_2)

Solution (Python):
N=int(input())
res=[]
while N>0:
	tmp=N%26
	N//=26
	if tmp==0:
		tmp=26
		N-=1
	res+=[tmp]
res.reverse()
print(''.join([chr(ord('a')+i-1) for i in res]))

Solution (Python):
table = list("abcdefghijklmnopqrstuvwxyz")
N = int(input())

ans = []
while True:
    ans.append(N%26)
    if N%26 == 0:
        N -= 1
    if  N//26 == 0:
        break
    N//=26
for x in reversed(ans):
    print(table[x-1],end='')

print()

Solution (Python):


n = int(input())
r = ""
while n > 0:
	cur = n % 26
	if cur == 0:
		n -= 26
		cur = 26
	n //= 26
	r = chr(ord('a')+cur-1)+r
print (r)

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

print(nu(int(input())))

Solution (Python):
N = int(input())
ans = []
while(True):
  m = N % 26
  if m == 0:
    m = 26
  ans.append(m)
  N -= m
  N = N // 26
  if N == 0:
    break



ans.reverse()
print(''.join(map(lambda i: chr(96 + i), ans)))