using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication3 { class Program { private static readonly List ConvertTable = Enumerable.Range(0x41, 26).Select(x => (char) x).ToList(); static void Main(string[] args) { var n = long.Parse(Console.ReadLine()); var buff = new List(); buff.Add(ConvertTable[(int)n%26]); ConvertTable.Insert(0, 'A'); while ((n /= 26) != 0) { buff.Add(ConvertTable[(int) n%26]); } buff.Reverse(); Console.WriteLine(buff.Aggregate(new StringBuilder(), (b, c) => b.Append(c)).ToString()); } } }