class Proc { public func doProc() { let num = Int64(readLine()!)! let ans = getAns(num, true) if ans.count == 0 { print("A") } else { print(ans) } } private func getAns(_ num:Int64, _ fst:Bool)->String { if num == 0 { return "" } let ch = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".map{ $0 } var sub:Int64 if num > 26 || fst { sub = num % 26 var ans = getAns((num - sub) / 26, false) ans.append(ch[Int(sub)]) return ans } else { sub = num - 1 return String(ch[Int(sub)]) } } } Proc().doProc()