Problem:
Score : 300 points

Problem Statement

1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows:

the dogs numbered 1,2,\cdots,26 were respectively given the names a, b, ..., z;

the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names aa, ab, ac, ..., zy, zz;

the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names aaa, aab, aac, ..., zzy, zzz;

the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names aaaa, aaab, aaac, ..., zzzy, zzzz;

the dogs numbered 475255,475256,\cdots were respectively given the names aaaaa, aaaab, ...;

and so on.

To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names:

a, b, ..., z, aa, ab, ..., az, ba, bb, ..., bz, ..., za, zb, ..., zz, aaa, aab, ..., aaz, aba, abb, ..., abz, ..., zzz, aaaa, ...

Now, Roger asks you:

"What is the name for the dog numbered N?"

Constraints

N is an integer.

1 \leq N \leq 1000000000000001

Input

Input is given from Standard Input in the following format:

N

Output

Print the answer to Roger's question as a string consisting of lowercase English letters.

Sample Input 1

2

Sample Output 1

b

Sample Input 2

27

Sample Output 2

aa

Sample Input 3

123456789

Sample Output 3

jjddja

Solution in C# (.NET Core 3.1.201) (judge verdict: Runtime Error)

using System;
using System.Linq;
using System.Collections.Generic;

namespace cs
{
    class Program
    {
        static void Main(string[] args)
        {
            var pg = new Program();
            //pg.Test();
            pg.Execute();

        }
        private void Test()
        {
        }

        private void Execute()
        {
            var N = ReadLine<long>();
            //var N = 1;
            var list = new List<string>();
            while (N > 1)
            {
                var t = N % 26 == 0 ? 26 : N % 26;
                list.Add(((char)(t + 96)).ToString());
                N /= 26;
            }
            list.Reverse();
            OutputResult(list.Aggregate((e, n) => e + n));
        }


        private void OutputResult<T>(T result)
        {
            Console.WriteLine(result);
        }

        private void OutputList<T>(IEnumerable<T> list)
        {
            list.ToList().ForEach(e => Console.WriteLine(e));
        }

        private static T ReadLine<T>()
        {
            return (T)Convert.ChangeType(Console.ReadLine(), typeof(T));
        }
        private static IEnumerable<T> ReadLinesList<T>()
        {
            return Console.ReadLine().Split(' ').Select(i => (T)Convert.ChangeType(i, typeof(T)));
        }

        public static (T, T) ReadLinesTuple2<T>()
        {
            var input = Console.ReadLine().Split(' ');
            return ((T)Convert.ChangeType(input.ElementAt(0), typeof(T)), (T)Convert.ChangeType(input.ElementAt(1), typeof(T)));
        }
        public static (T, T, T) ReadLinesTuple3<T>()
        {
            var input = Console.ReadLine().Split(' ');
            return ((T)Convert.ChangeType(input.ElementAt(0), typeof(T)), (T)Convert.ChangeType(input.ElementAt(1), typeof(T)), (T)Convert.ChangeType(input.ElementAt(2), typeof(T)));
        }
        public static (T, T, T, T) ReadLinesTuple4<T>()
        {
            var input = Console.ReadLine().Split(' ');
            return ((T)Convert.ChangeType(input.ElementAt(0), typeof(T)), (T)Convert.ChangeType(input.ElementAt(1), typeof(T)), (T)Convert.ChangeType(input.ElementAt(2), typeof(T)), (T)Convert.ChangeType(input.ElementAt(3), typeof(T)));
        }
        public static IEnumerable<T> ReadLineNTimes<T>()
        {
            var input = new List<T>();
            var N = long.Parse(Console.ReadLine());
            for (int i = 0; i < N; i++)
            {
                input.Add((T)Convert.ChangeType(Console.ReadLine(), typeof(T)));
            }
            return input;
        }
        public static IEnumerable<T> ReadLineNTimes<T>(long N)
        {
            var input = new List<T>();
            for (int i = 0; i < N; i++)
            {
                input.Add((T)Convert.ChangeType(Console.ReadLine(), typeof(T)));
            }
            return input;
        }
        public static IEnumerable<T> ReadLineNTimes<T>(int N)
        {
            var input = new List<T>();
            for (int i = 0; i < N; i++)
            {
                input.Add((T)Convert.ChangeType(Console.ReadLine(), typeof(T)));
            }
            return input;
        }

        private int SolveDynamicProgramming(int n, IEnumerable<int> valueList)
        {
            var inputList = valueList.ToList();
            var dpList = new List<int>() { 0 };
            for (int i = 0; i < n; ++i)
            {
                dpList.Add(Math.Max(dpList[i], dpList[i] + inputList[i]));
            }

            return dpList[n];
        }

        private int SolveDynamicProgrammingForKnapsack(int n, int weight, List<int> valueList, List<int> weightList)
        {
            var dpList = new List<List<int>>();

            for (int i = 0; i < n + 1; ++i)
            {
                dpList.Add(Enumerable.Repeat(0, weight + 1).ToList());
            }

            for (int i = 0; i < n; ++i)
            {
                for (int w = 0; w <= weight; ++w)
                {
                    if (w >= weightList[i])
                    {
                        dpList[i + 1][w] = Math.Max(dpList[i][w - weightList[i]] + valueList[i], dpList[i][w]);
                    }
                    else
                    {
                        dpList[i + 1][w] = dpList[i][w];
                    }
                }
            }

            return dpList[n][weight];
        }

        public static int Gcd(int a, int b)
        {
            Func<int, int, int> gcd = null;
            gcd = (x, y) => y == 0 ? x : gcd(y, x % y);
            return a > b ? gcd(a, b) : gcd(b, a);
        }

        public static IEnumerable<bool[]> BitFullSearch(int n)
        {
            if (n <= 0)
            {
                yield return new bool[] { };
                yield break;
            }

            for (int i = 0; i < Math.Pow(2, n); i++)
            {
                var array = new bool[n];
                for (int j = 0; j < n; j++)
                {
                    var targetBit = (i >> j) & 1;
                    if (targetBit == 1) array[j] = true;
                }

                yield return array;
            }
        }

    }
}