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