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()); Console.WriteLine( new[] {ConvertTable[(int) (n%26)]}.Concat( Enumerable.Range(0, 10000).Select(_ => n /= 26).TakeWhile(x => x != 0).Select(x => ConvertTable[(int) (--n%26)])) .Reverse() .Aggregate(new StringBuilder(), (b, c) => b.Append(c)) .ToString()); } } }