class Solution(object):
def convertToTitle(self, n):
"""
:type n: int
:rtype: str
"""
res=''
while n>0:
tmp=n
n=(n-1)/26
res+=chr(65+(tmp-1)%26)
return res[::-1]