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 string

N = int(input()) - 1
smap = dict(enumerate(string.ascii_lowercase))

res = []
while True:
    d, m = divmod(N, 26)
    res.append(m)
    if d-1 > 25:
        N = d-1
    else:
        if d == 0:
            break
        else:
            res.append(d-1)
            break

print("".join(smap[i] for i in reversed(res)))

Solution (Python):





















alp = 'abcdefghijklmnopqrstuvwxyz'
n = int(input())
for i in range(10):
    ind1 = 26*(pow(26,i-1)-1)//25 + 1
    ind2 = 26*(pow(26,i)-1)//25 + 1
    if ind1 <= n < ind2:
        n_len = i



n = n
ans = ''
for i in range(20,1,-1):
    curr_a = n%26
    ind = curr_a -1
    if ind == -1: ind = 25
    ans += alp[ind]
    if n < 26:
        break
    n = n//26
    if ind == 25: 
        n=n-1
        if n <= 0:break

print(ans[::-1])

Solution (Python):
n=int(input())
ans=""
def re(n,ans):
    if n<=26:
        return ans+chr(n+96)
    rem=(n-1)%26
    div=(n-1)//26
    return re(div,ans+chr(rem+97))
print(re(n,"")[::-1])

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 henkan(num):
    if num<=26:
        return chr(64+num)
    elif num%26==0:
        return henkan(num//26-1)+chr(90)
    else:
        return henkan(num//26)+chr(64+num%26)
      
num=int(input())
ans=henkan(num)
print(ans.lower())

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

Solution (Python):



n = int(input())
L = []
a_l = 'abcdefghijklmnopqrstuvwxyz'
i = 1
L.append(1)
while True:
    if n//(26**i)>0:
        L.append(26**i+L[i-1])
    else:
        break
    i += 1


L  = sorted(L,reverse=True)

for i in range(len(L)):
    if i < len(L)-1:
        a = (n-L[i+1])//(L[i]-L[i+1])
        n = n%(L[i]-L[i+1])
    else:
        a = n
    
    if (i == 0 and a > 0) or i > 0:
        print(a_l[a-1],end='')

Solution (Python):
n=int(input())
i=0
pl=list()
while True:
    i=i+1
    if (26*(1-26**(i-1)))/(1-26)+1<=n and n<=(26*(1-26**(i-1)))/(1-26)+26**i:
        break
a=n-(26*(1-26**(i-1)))/(1-26)-1
for l in range (i):
    a,b=divmod(a,26)
    pl.insert(0,(chr(int(b)+97)))
print("".join(pl))

Solution (Python):
import string

N = int(input())
alphabet = list(string.ascii_lowercase)
num2alphabet = {i + 1: a for i, a in enumerate(alphabet)}
num2alphabet[0] = "z"
ans = ""

while N > 0:
    num = N % 26
    ans += num2alphabet[num]
    if N <= 26:
        break

    if num == 0:
        N -= 1

    N = N // 26

print(''.join(list(reversed(ans))))

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

n -= 1
li = [26 ** i for i in range(1, 20)]
for i in range(18):
    li[i+1] += li[i]

for i in range(19):
    if n >= li[i]:
        pass
    else:
        tmp = i
        if i == 0:
            pass
        else:
            n -= li[i-1]
        break

for i in range(tmp+1):
    ans += chr(ord('a') + n % 26)
    n //= 26

print(ans[::-1])

Solution (Python):
N = int(input())
ans = []
q = 1
while q != 0:
    q, r = divmod(N, 26)
    if r == 0:
        r = 26
        q = q - 1
    ans.append(int(r))
    N = (N - r)/26
l = len(ans)
Ans = 'a'
for i in range(l):
    Ans += chr(ans[i]+96)
print(Ans[l:0:-1])

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

c = ['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']

k = 1
n1 = n

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

ans = ''

ans = c[n1%26]+ans

for i in range(k-1):
	if n1%26!=0:
		n1 = n1//26+1
	else:
		n1 = n1//26
	ans = c[n1%26]+ans

print(ans)

Solution (Python):
def convert(n):
    return chr(ord('a') + int(n))


def main():
    n = int(input())
    ans = ''
    n -= 1
    
    ans = convert(n % 26)
    n = n // 26
    while n > 0:
        n -= 1
        ans += convert(n % 26)
        n = n // 26
    ans = ans[::-1]
    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
def ColIdxToXlName(idx):
    if idx < 1:
        raise ValueError("Index is too small")
    result = ""
    while True:
        if idx > 26:
            idx, r = divmod(idx - 1, 26)
            result = chr(r + ord('a')) + result
        else:
            return chr(idx + ord('a') - 1) + result

print(ColIdxToXlName(int(input())))

Solution (Python):
def func(tmp):
  ans = ''
  sub_ans = (tmp-1)/26
  if int(sub_ans) >0:
      ans += func(int(sub_ans))
  if (tmp-1) <= 0:
    ans+='a'
  else:
  	ans += chr(97 + int(tmp-1)%26)
  return ans

  
tmp = int(input())
print(func(tmp))

Solution (Python):
N = int(input())
ans = []

while N != 0:
    sup = N % 26
    if sup == 0:
        sup = 26
        ans.append(chr(96 + sup))
    else:
        ans.append(chr(96 + sup))
    N = int((N - sup) / 26)

ans = ''.join(reversed(ans))
print(ans)

Solution (Python):
n=int(input());ans="";i=0;
while(n>0):
  n-=1;
  a=n%26
  ans+=chr(97+a);
  n//=26;
print(ans[::-1])

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

N = int(input())

ans=change(N)
print(ans.lower())

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


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

Solution (Python):
n=int(input())-1
al=['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=[]
m=n
k=1
while m>=26**k:
    m-=26**k
    k+=1
for i in range (k):
    ans.append(al[m%26])
    m=(m-m%26)//26
if k==1:
    print(ans[0])
elif k==2:
    print(ans[1]+ans[0])
elif k==3:
    print(ans[2]+ans[1]+ans[0])
elif k==4:
    print(ans[3]+ans[2]+ans[1]+ans[0])
elif k==5:
    print(ans[4]+ans[3]+ans[2]+ans[1]+ans[0])
elif k==6:
    print(ans[5]+ans[4]+ans[3]+ans[2]+ans[1]+ans[0])
elif k==7:
    print(ans[6]+ans[5]+ans[4]+ans[3]+ans[2]+ans[1]+ans[0])
elif k==8:
    print(ans[7]+ans[6]+ans[5]+ans[4]+ans[3]+ans[2]+ans[1]+ans[0])
elif k==9:
    print(ans[8]+ans[7]+ans[6]+ans[5]+ans[4]+ans[3]+ans[2]+ans[1]+ans[0])
elif k==10:
    print(ans[9]+ans[8]+ans[7]+ans[6]+ans[5]+ans[4]+ans[3]+ans[2]+ans[1]+ans[0])
elif k==11:
    print(ans[10]+ans[9]+ans[8]+ans[7]+ans[6]+ans[5]+ans[4]+ans[3]+ans[2]+ans[1]+ans[0])

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

a1 = 26**1
a2 = 26**2
a3 = 26**3
a4 = 26**4
a5 = 26**5
a6 = 26**6
a7 = 26**7
a8 = 26**8
a9 = 26**9
a10 = 26**10
a11 = 26**11
a12 = 26**12

b1 = a1
b2 = a1+a2
b3 = a1+a2+a3
b4 = a1+a2+a3+a4
b5 = a1+a2+a3+a4+a5
b6 = a1+a2+a3+a4+a5+a6
b7 = a1+a2+a3+a4+a5+a6+a7
b8 = a1+a2+a3+a4+a5+a6+a7+a8
b9 = a1+a2+a3+a4+a5+a6+a7+a8+a9
b10 = a1+a2+a3+a4+a5+a6+a7+a8+a9+a10
b11 = a1+a2+a3+a4+a5+a6+a7+a8+a9+a10+a11
b12 = a1+a2+a3+a4+a5+a6+a7+a8+a9+a10+a11+a12

b = [b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12]
c = ['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']
s = ''
e = []
     
if n <= b1:
    i = 1
elif b1 < n <= b2:
    i = 2
elif b2 < n <= b3:
    i = 3
elif b3 < n <= b4:
    i = 4
elif b4 < n <= b5:
    i = 5
elif b5 < n <= b6:
    i = 6
elif b6 < n <= b7:
    i = 7
elif b7 < n <= b8:
    i = 8
elif b8 < n <= b9:
    i = 9
elif b9 < n <= b10:
    i = 10
elif b10 < n <= b11:
    i = 11
elif b11 < n:
    i = 12


for j in range (i):
    if n % 26 == 0:
        f = n % 26
        e.append(f)
        n = n // 26 -1
    elif n % 26 != 0:
        f = n % 26
        e.append(f)
        n = n // 26

for  k in range(i,0,-1):
    s = s + c[e[k-1]-1]

print(s)

Solution (Python):
def main():
    import sys
    sys.setrecursionlimit(10**9)
    input = sys.stdin.readline

    a = "zabcdefghijklmnopqrstuvwxy"
    N = int(input())
    
    
    

    ans = []
    d = 1
    m = 26
    while N != 0:
        tmp = (N % m)
        ans.append(a[tmp//d])
        N -= tmp if tmp != 0 else m
        d *= 26
        m *= 26
    
    ans.reverse()
    print(''.join(ans))

main()

Solution (Python):
import math

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

def ii():
    return int(input())

def main():
    N = ii()
    l = ''
    while N:
        if N%26:
            tmp = N%26
            N //= 26
        else:
            tmp = 26
            N //= 26
            N -= 1
        l += chr(96+tmp)
    print(l[::-1])


if __name__ == '__main__':
    main()

Solution (Python):
N=int(input())-1
ans=''
X=26
i=1
while N>X**i-1:
  N-=X**i
  i+=1
for ii in range(i):
  n=N%X
  N=N//X
  ans=chr(n+97)+ans
print(ans)

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

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

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

a = []
b = list('abcdefghijklmnopqrstuvwxyz')

if n <= 25:
    print(b[n])
    exit()
count = 0
for i in range(1,100):
    if n >= 26 ** i:
        n = n - 26 ** i
        count += 1
    else:
        break



count2 = 0


while 1:
    
    
    if count == 0:
        a.append(n)
        break
    count2 = n // (26 ** count)
    n = n % 26 ** count
    a.append(count2)
    count -= 1


x = [b[a[i]]for i in range(len(a))]
print("".join(x))

Solution (Python):
a=[chr(i) for i in range(97,97+26)]
n=int(input())
c=26
count=1
while 1:
  if n<=c:
    nn=(n-1)%c
    break
  else:
    n-=c
    c*=26
    count+=1
aa=[]
while count>0:
  aa.append(int(nn))
  nn=int(nn/26)
  count-=1
aa=aa[::-1]
ans=[]
cc=26
for i in aa:
  ans.append(a[int(i%cc)])
  i/=26
print("".join(ans))

Solution (Python):
import sys
sys.setrecursionlimit(10**9)

def mi(): return map(int,input().split())
def ii(): return int(input())
def isp(): return input().split()

def main():
    N=ii()

    k = N
    ans = []
    a_ord = ord('a')

    def mod(n):
        return n%26 if n % 26 > 0 else 26


    while k > 0:
        
        ans.append(chr(a_ord+mod(k)-1))
        if k % 26 > 0:
            k //= 26
        else:
            k -= 1
            k //= 26

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


if __name__ == "__main__":
  main()

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

l = []
while True:
    if n%26 == 0:
        l.append(26)
        n = n//26 - 1
    else:
        l.append(n % 26)
        n //= 26
    if n == 0:
        break
    
ans = []
for v in l:
    ans.append(chr(v + 96))

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

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

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']
mm = 1
name = ''
while True:
    if N > 26 ** mm:
        N = N - 26 ** mm
        mm += 1
    else:
        break


for i in range(mm):
    
    

    if N< 1:
        name =  'a' +name
    else:
            if N%26 == 0:
                name = alphabet[25] + name
                N = N//26
            else:
                name = alphabet[N%26-1] + name
                N = N//26 +1
print(name)

Solution (Python):
N = int(input())
ABC = 'abcdefghijklmnopqrstuvwxyz'
ans = []

while(1):
    if(N%26 == 0):
        ans.append(N%26) 
        N = int(N/26) -1
    else:
        ans.append(N%26) 
        N = int(N/26) 
    
    if N == 0:
        break
        
A = ""
ans.reverse()

for i in ans:
    if i == 0:
        A += 'z'
    else:
        A += ABC[i-1]
        
print(A)

Solution (Python):
n = int(input())
alpha = "zabcdefghijklmnopqrstuvwxyz"
ans = ""
i = 1
while n!= 0:
    flag = False
    ans += alpha[n%26]
    if n%26 == 0:
        flag = True
    n //= 26 
    n -= flag
print(ans[::-1])

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
input = sys.stdin.readline

n = int(input())
name = []
hantei = [1,27,703,18279,475255,12356631,321272407,8353082583,217180147159,5646683826135,146813779479511,3817158266467287]

for i in range(len(hantei)-1):
    if hantei[i] <= n < hantei[i+1]:
        n -= hantei[i]
        while n > 0:
            name.insert(0,n%26)
            n //= 26
        while i+1 > len(name):
            name.insert(0,0)

name = [chr(ord('a')+i) for i in name]

print("".join(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())

modl = []

while n > 26:
    n, mod = divmod(n,26)
    if mod == 0:
        mod = 26
        n = n-1
    modl.append(mod)

modl.reverse()

print( chr(n+96),*[chr(i+96) for i in modl] ,sep="")

Solution (Python):
import string
numbers = "0123456789"
alphabets = string.ascii_letters  
characters = numbers + alphabets


def base_cvt(value, n=2):
    result = ''
    tmp = int(value)
    while tmp >= n:
        idx = tmp % n
        if idx == 0:
            idx = 26
            tmp = int(tmp / n) - 1
        else:
            tmp = int(tmp / n)
        result = characters[idx] + result
    if tmp != 0:
        idx = tmp % n
        result = characters[idx] + result
    return result


N = int(input())

res = base_cvt(N, 26)
if res[-1] == "0":
    res = "q" * (len(res)-1)
for d in str(res):
    if d == "0":
        d = "q"
    if ord(d) >= 96:
        d = str(9 + ord(d) - 96)
    print(chr(96 + int(d)), end="")
print()

Solution (Python):
import string
import math
n = int(input())

lis = list(string.ascii_lowercase)

ans =""
i = 1
while n > 0:
    if n <= 26:
        t = n % 26
        ans += lis[t-1]
        break
    else:
        if n % 26 == 0:
            ans += lis[25]
            n = (n // 26) -1
        else:
            t = n % 26
            ans += lis[t-1]
            n = n//26
    
print(ans[::-1])

Solution (Python):
N = int ( input().strip() ) ;

c = 0 ;
r = 1 ;
while c < N :
	x = pow ( 26 , r ) 
	if x  + c >= N :
		break ;
	r += 1; 
	c += x ;

v = N - c -1 ;

L = [] ;
for x in range ( r ) :
	L.insert( 0 , chr( v % 26 + ord('a') ) ) ; 
	v //= 26 ;
print ( "".join(L) ) ;

Solution (Python):
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"]
S = ""
N = int(input())
while N > 26:
  if N % 26 != 0:
    a = N % 26
    N -= a
    S = L[a] + S
    N //= 26
  else:
    S = L[26] + S
    N //= 26
    N -= 1
S = L[N] + S
print(S.lower())

Solution (Python):
N = int(input())
if N == 26:
    print('z')
    exit()
elif N == 702:
    print('zz')
    exit()
elif N == 18278:
    print('zzz')
    exit()
elif N == 475254:
    print('zzzz')
    exit()
elif N == 12356630:
    print('zzzzz')
    exit()
elif N == 321272406:
    print('zzzzzz')
    exit()
elif N == 8353082582:
    print('zzzzzzz')
    exit()
elif N == 217180147158:
    print('zzzzzzzz')
    exit()
elif N == 5646683826134:
    print('zzzzzzzzz')
    exit()
elif N == 146813779479510:
    print('zzzzzzzzzz')
    exit()
L = [26**i for i in range(0,12)]
for i in range(1,11):
    L[i] += L[i-1]
a = 0
while N // L[a] >= 1:
    a += 1
A = []
for i in range(a):
    A.append(N % 26)
    if N % 26 == 0:
        N = (N//26)-1
    else:
        N = N // 26
d = {}
d[0] = 'z'
for i in range(1,27):
    d[i] = chr(96+i)
ans = ''
for i in range(-1,-len(A)-1,-1):
    ans += d[A[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 colnum_string(n):
    string = ""
    while n > 0:
        n, remainder = divmod(n - 1, 26)
        string = chr(97 + remainder) + string
    return string

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

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

Solution (Python):
check_alf = [chr(ord('a') + i) for i in range(26)]

n=int(input())

check_num = 0

keta = 0

while check_num+26**(keta+1) < n:
    keta += 1
    check_num += 26**keta
sa = n - check_num

ans = []

index = keta

while keta > 0:
    if sa%(26**keta) == 0:
        ans.append(check_alf[sa//(26**keta)-1])
    else:
        ans.append(check_alf[sa//(26**keta)])
    sa -= (sa//(26**keta))*(26**keta)
    keta -= 1

ans.append(check_alf[sa-1])

print(''.join(map(str,ans)))

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

ans = []
while n >= 0:
    n, y = divmod(n, 26)
    ans.append(y)
    n -= 1
ans.reverse()


def to_alpha(x):
    return chr(x+ord('a'))


print(''.join(map(to_alpha, ans)))

Solution (Python):
N =int(input())
import math
def digits(n):
    digits = "abcdefghijklmnopqrstuvwxyz"
    return digits[n%26-1]

def alph(X):
    if int(X/27) >= 1:
        return alph(math.ceil(X/26)-1) + digits(X)
    else:
        return digits(X)
print(alph(N))

Solution (Python):
N = int(input())
s=1
while pow(26,s)<N:
    N-=pow(26,s)
    s+=1


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





print("".join(reversed(ans)))

Solution (Python):
import sys
import math

ALPHABET = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]
result = []
N = int(input())
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).lower())

Solution (Python):
N=int(input())
abclist=[]
for a in 'abcdefghijklmnopqrstuvwxyz':
    abclist.append(a)
k=0
n=N
alist=[]
while n>0:
    amari=n%26
    if amari==0:
        n=n//26-1
    else:
        n=n//26
    alist.append(amari)

name=''

for a in alist:
    name=abclist[a-1]+name
print(name)

Solution (Python):
def main():
  num = int(input())
  
  dchar = 'abcdefghijklmnopqrstuvwxyz'
  result = []
  num = num - 1
  while num >= 0:
    result.append(dchar[num % 26])
    num = num // 26 - 1
  print(''.join(reversed(result)))
  
main()

Solution (Python):
n=int(input())
nt=n
i=1
temp=0
al=["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 True:
  if n<=temp+26**i:
    break
  else:
    temp=temp+26**i
    i=i+1
while True:
  if i==1:
    ans.append(al[(nt-temp-1)%26])
    break
  else:
    k=(nt-temp-1)//26**(i-1)
    ans.append(al[k])
    i=i-1
    nt=nt-26**i*(k+1)
    temp=temp-26**i
print("".join(ans))

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

print(colnum_string(n))

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

cnt = [0] + [26 ** i for i in range(1, 11)]
for i in range(10):
    cnt[i + 1] += cnt[i]

ans = ""
x = N - 1
for i in reversed(range(1, 11)):
    if x >= cnt[i]:
        v = (x - cnt[i]) // 26 ** i
        ans += chr(ord("a") + v)
        x -= (v + 1) * (26 ** i)

ans += chr(ord("a") + x % 26)
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())
al = list('abcdefghijklmnopqrstuvwxyz')

amari = []

while n != 0:
  if n%26 == 0:
    n = n//26 - 1
    amari.append(26)
  else:
    amari.append(n%26)
    n = n//26
  
amari.reverse()

ans = ''
for i in amari:
  ans += al[i-1]
  
print(ans)

Solution (Python):
n=int(input())
t=0
a=''
al='abcdefghijklmnopqrstuvwxyz'
b=[1]
c=[1]
for i in range(10):
  c.append(c[-1]*26)
  b.append(sum(c))
b.sort(reverse=True)
b.append(1)
c.sort(reverse=True)
c.append(1)
flg=0
i=0
while n>0:
  if flg ==1:
    if n >= b[i]:
      tmp=0
      while n >= b[i] and tmp <26:
        n -= c[i]
        tmp+=1
      a+=al[tmp-1]
      i+=1
    else:
      a+='a'
      i+=1
  elif n >= b[i]:
    flg=1
    tmp=0
    while n >= b[i] and tmp <26:
      n -= c[i]
      tmp+=1
    a+=al[tmp-1]
    i+=1
  else:
    i+=1
print(a)

Solution (Python):
N = int(input())
abc = ["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 = []
while N>0:
    result += [abc[((N-1) % 26)]]
    N = (N-1) // 26
print("".join(result[::-1]))

Solution (Python):
N = int(input())-1
letters = 'abcdefghijklmnopqrstuvwxyz'

result = ""
while N >= 0:
    i = N % 26
    result += letters[i]
    N = N // 26 - 1

print(result[::-1])

Solution (Python):
n=int(input())
i=1
a=0
m=n
while n-26**i>0:
    n=n-26**i
    i+=1
    a+=n**i 
ans=""
b=0
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']
for j in range(i):
    b=m%26
    m=m//26
    if b==0:
      m=m-1
    ans=l[b-1]+ans
print(ans)

Solution (Python):

alphabet = 'abcdefghijklmnopqrstuvwxyz'
N = int(input())

n = N
name = []
while n != 0:
    name.append(alphabet[(n%26)-1])
    if n%26==0:
        n = int(n/26)-1
    else:
        n = int(n/26)


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

Solution (Python):
def main():
    alpha = 'zabcdefghijklmnopqrstuvwxy'
    N = int(input())
    name = ''
 
    while True:
        a = N%26
        name = alpha[a] + name
        N //=26
        if a == 0:
            N-=1
        if N == 0:
            break
    print(name)
 
if __name__ == "__main__":
    main()

Solution (Python):
import sys, collections, bisect, itertools, heapq, math, copy, string
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

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

    ans = ''
    while N >= 26:
        ans += string.ascii_lowercase[N%26]
        N = N // 26 - 1
    ans += string.ascii_lowercase[N%26]

    print(ans[::-1])

if __name__ == '__main__':
    resolve()

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

divisor = n
ans = ""
a = ["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 divisor > 0:
    if divisor % 26 == 0:
        surplus = divisor % 26
        ans = a[surplus] + ans
        divisor = divisor // 26 -1
    else:
        surplus = divisor % 26
        ans = a[surplus] + ans
        divisor = divisor // 26
print(ans)

Solution (Python):
n=int(input())
c=""
while(n>0):
    mod=n%26
    if mod==0:
        mod=26
    c+=chr(96+mod)
    n=(n-mod)//26
print(c[::-1])

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

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

print(f(N))

Solution (Python):
N = int(input())
nanjo = -1
a = 1
while a <= N:
    a*=26
    nanjo += 1
A = [0]*(nanjo+1)
L = nanjo
for i in range(nanjo+1):
    A[i] = N//26**(nanjo)
    N -= A[i]*26**(nanjo)
    nanjo -= 1
for i in reversed(range(L+1)):
    if i != 0:
        if A[i] <= 0:
            A[i] += 26
            A[i-1] -= 1       
for i in range(L+1):
    if i == 0 and A[i] == 0:
        continue
    else:
        print(chr(A[i]+96), end = "")

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

    seed = 97
    answer = ""

    while True:
        remainder = N % 26

        if(remainder == 0):
            answer = "z" + answer
        else:
            answer = chr(seed - 1 + remainder) + answer

        if N <= 26:
            print(answer)
            return

        elif remainder == 0:
            N = N // 26 - 1

        else:
            N = N // 26

if __name__ == "__main__":
    main()

Solution (Python):


import glob
import os

bn = os.path.basename(__file__).split('.')[0]
dn = os.path.dirname(__file__).split('/')


REL_PATH = dn[len(dn)-2] + '\\' + dn[len(dn)-1] + '\\' + bn


TOP_PATH = 'C:\\AtCoder'

class Common:

    problem = []
    index = 0

    def __init__(self, rel_path):
        self.rel_path = rel_path

    def initialize(self, path):
        file = open(path)
        self.problem = file.readlines()
        self.index = 0
        return

    def input_data(self):
        try:
            IS_TEST
            self.index += 1
            return self.problem[self.index-1]

        except NameError:
            return input()

    def resolve(self):
        pass

    def exec_resolve(self):
        try:
            IS_TEST
            for path in glob.glob(TOP_PATH + '\\' + self.rel_path + '/*.txt'):
                print("Test: " + path)
                self.initialize(path)
                self.resolve()
                print("\n\n")
        except NameError:
            self.resolve()


class Solver(Common):

    def resolve(self):

        N = int(self.input_data())
        dog_num = 1000000000000001
        alp = 'abcdefghijklmnopqrstuvwxyz'

        name = ''
        for i in range(0, 13, 1):
            n = N % 26
            if n != 0:
                name = alp[n-1] + name
            else:
                name = 'z' +name
            N = (N-1) // 26
            if N < 1:
                break
        print(name)

solver = Solver(REL_PATH)
solver.exec_resolve()

Solution (Python):
N = int(input())
cnt = ['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']
ans2 = ''
for i in range(10**20):
  ans1 = cnt[N%26]
  ans2 = ans1 + ans2
  if N%26 == 0:
     N -= 1
  if N < 26:
    break
  N = N//26
print(ans2)

Solution (Python):
ALPHA = 'abcdefghijklmnopqrstuvwxyz'
N = int(input())
ans = '' if N != 0 else 'a'
while N - 1 >= 0:
    N, r = divmod(N - 1, 26)
    ans += ALPHA[r]
print(ans[::-1])

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

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

Solution (Python):
import string

N = int(input())

alph = string.ascii_lowercase

def f(N):
    ans = []
    while N > 0:
        k = N % 26
        ans.append(alph[k-1])
        if N == 26:
            break
        if k == 0:
            N -= 26
        N = N // 26

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

print(f(N))

Solution (Python):
N = int(input())
strs = 26
ans = ''
while True:
  if N <= strs:
    ans += chr(N + 96)
    break
  if N % strs == 0:
    ans += 'z'
    N = N //strs - 1
  else:    
    ans += chr(N % strs + 96)
    N = N // strs
print(ans[::-1])

Solution (Python):
N = int(input())
max = 0
length = 0
alphabet = 'abcdefghijklmnopqrstuvwxyz'
name = ""

i = 0
while True:
  i += 1
  max += 26**i
  length = i
  if N <= max:
    break

index_10 = N - (max - 26**i) -1

for j in range(length):
  index = index_10 % 26
  index_10 //= 26
  alphabet[index]
  name = alphabet[index] + name

print(name)

Solution (Python):
def main():
  N =  int(input())
  ans = ""
  moji = "abcdefghijklmnopqrstuvwxyz"
  while N > 0:
    N -= 1
    ans += moji[N%26]
    N //= 26
  print(ans[::-1])
  
if __name__ == "__main__":
  main()

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

ans=[]
a=ord("a")
tmp=0
while N>0:
    tmp+=1
    if tmp==1:
        chrr=N%26-1
        if chrr<0:
            chrr+=26
        ans.append(chr(a+chrr))
    else:
        chrr=((N-1)//(26**(tmp-1)))%26
        if chrr<0:
            chrr+=26
        ans.append(chr(a+chrr))
    N-=26**tmp

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

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

M = N

num_list = []

while M > 26:
    r = M % 26
    
    if r != 0:
        M = M // 26
    
    if r == 0:
        r = 26
        M = M // 26 - 1
    
    num_list.append(r)

if M != 0:    
    num_list.append(M)

num_list.reverse()

result = str()

for a in num_list:
    result = result + chr(a + 64).lower()

print(result)

Solution (Python):
import sys


N = int(input())






d=""
dchar ="abcdefghijklmnopqrstuvwxyz"

while N > 0:
    N -= 1
    d += dchar[N%26]
    N//=26
    
    
print(d[::-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)).lower()
print(ans)

Solution (Python):
import math
n = int(input())
ans = []
tmp = n
cnt = 1
r = 0
for i in range(1, 11):
  tmp -= pow(26, i)
  if tmp <= 0:
    break
  cnt += 1
  r += pow(26, i)
idx = n - r
now = 0
while(cnt!=1):
  cnt -= 1
  j = 1
  while(1):
    now += pow(26, cnt)
    if idx <= now:
      now -= pow(26, cnt)
      ans.append(j)
      break
    else:
      j += 1
k = 0
while(1):
  if now+k==idx-1:
    ans.append(k+1)
    break
  else:
    k += 1
anstr = ''
for e in ans:
  anstr += chr(e+96)
print(anstr)

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

Solution (Python):

N=int(input())

num_a=ord("a")

ans=""
flg=True

X_dumy = N
while X_dumy>0:
    X_dumy-=1
    out = X_dumy%26
    X_dumy = X_dumy//26
    ans=chr(num_a+(out)%26)+ans


print(ans)