Under construction

Still being built. Things may change

Very Strange String

Time limit2sMemory limit1024 MB

Summary
Given k and m, the task is to build a lowercase string of length at most m whose strangeness (the sum of G_i times F_i) equals k.
Level

Hard9 of 10

Topics
String matching, Math, Implementation
Solved
No attempts yet

Statement

Professor X likes to solve puzzles in the morning. But one puzzle was too hard even for the sick professor.

The professor likes to define unusual functions, especially for strings. Examples of such functions are GG and FF.

A substring is a string obtained from the original by deleting some (possibly zero) characters from the beginning and the end. The ii-th prefix is the string that keeps exactly ii characters from the start, with nothing removed from the end. The ii-th suffix is the string with nothing removed from the end and exactly i−1i-1 characters removed from the start.

For a string ss, GiG_i is the length of the longest suffix of the ii-th prefix that is a prefix of ss and is not equal to the ii-th prefix itself. FiF_i is the length of the longest prefix of the ii-th suffix that is a prefix of ss. The professor decided that G1=0G_1 = 0 and F1=0F_1 = 0, and it is hard to argue with him.

The strangeness of a string is the sum of the products of GiG_i and FiF_i over all ii from 1 to ∣s∣|s|. Find a string of length at most mm whose strangeness is equal to the given number kk.

When Wolverine was met, the professor asked a comrade for help. But even for the hero, this puzzle was too hard. Can you solve it?

Input

The first line contains the integers kk and mm (1≤k≤10141 \le k \le 10^{14}). The value of mm is fixed within each test group; see the Scoring section.

Output

Print a string of lowercase Latin letters of length at most mm whose strangeness is kk. If several strings fit, print any of them. The answer is guaranteed to exist.

Hint

Consider the string aaaa. Its GG is [0,1,2,3][0, 1, 2, 3] and its FF is [0,3,2,1][0, 3, 2, 1]. So the strangeness of the string is 0⋅0+1⋅3+2⋅2+3⋅1=100 \cdot 0 + 1 \cdot 3 + 2 \cdot 2 + 3 \cdot 1 = 10.

Examples1

  1. Example 1

    Input
    10 25
    
    Expected output
    aaaab