function test(n) { var result = [] do { result.push((n % 26) + 65); n = (n / 26) - 1; } while (n >= 0); return String .fromCharCode .apply(String, result.reverse()) } function Main(input) { var input = input.split('\n')[0]; var N = parseInt(input) console.log(N, test(N)) } Main(require("fs").readFileSync("/dev/stdin", "utf8"));