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: Accepted)

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ABC171C
{
    class Program
    {
        static void Main(string[] args)
        {
            long N = long.Parse(Console.ReadLine());
            long keta = 0;
            long max = 0;
            long plus = 1;
            long pre = 0;
            for(int i = 0; i < 12; i++)
            {
                keta += 1;
                plus *= 26;
                pre = max;
                max += plus;
                if (N <= max)
                {
                    break;
                }
            }
            //Console.WriteLine(keta);

            string[] ans = new string[keta];
            long temp = keta;
            N = N - pre - 1;
            plus /= 26;
            while (temp > 0)
            {
                long m = N / plus;
                N -= m * plus;
                if (m == 0)
                {
                    ans[keta - temp] = "a";
                }
                else if (m == 1)
                {
                    ans[keta - temp] = "b";
                }
                else if (m == 2)
                {
                    ans[keta - temp] = "c";
                }
                else if (m == 3)
                {
                    ans[keta - temp] = "d";
                }
                else if (m == 4)
                {
                    ans[keta - temp] = "e";
                }
                else if (m == 5)
                {
                    ans[keta - temp] = "f";
                }
                else if (m == 6)
                {
                    ans[keta - temp] = "g";
                }
                else if (m == 7)
                {
                    ans[keta - temp] = "h";
                }
                else if (m == 8)
                {
                    ans[keta - temp] = "i";
                }
                else if (m == 9)
                {
                    ans[keta - temp] = "j";
                }
                else if (m == 10)
                {
                    ans[keta - temp] = "k";
                }
                else if (m == 11)
                {
                    ans[keta - temp] = "l";
                }
                else if (m == 12)
                {
                    ans[keta - temp] = "m";
                }
                else if (m == 13)
                {
                    ans[keta - temp] = "n";
                }
                else if (m == 14)
                {
                    ans[keta - temp] = "o";
                }
                else if (m == 15)
                {
                    ans[keta - temp] = "p";
                }
                else if (m == 16)
                {
                    ans[keta - temp] = "q";
                }
                else if (m == 17)
                {
                    ans[keta - temp] = "r";
                }
                else if (m == 18)
                {
                    ans[keta - temp] = "s";
                }
                else if (m == 19)
                {
                    ans[keta - temp] = "t";
                }
                else if (m == 20)
                {
                    ans[keta - temp] = "u";
                }
                else if (m == 21)
                {
                    ans[keta - temp] = "v";
                }
                else if (m == 22)
                {
                    ans[keta - temp] = "w";
                }
                else if (m == 23)
                {
                    ans[keta - temp] = "x";
                }
                else if (m == 24)
                {
                    ans[keta - temp] = "y";
                }
                else if (m == 25)
                {
                    ans[keta - temp] = "z";
                }
                temp -= 1;
                plus /= 26;
            }
            Console.WriteLine(string.Join("",ans));
        }
    }
}