Alice and Bob (and string): Double Menace

문자열 s가 주어질 때, t에서 시작하는 위치 확장 게임이 선수 승리가 되는 부분 문자열 중 k번째로 사전순으로 작은 것을 구한다.

어려움9문자열게임 이론문자열 매칭조합론아직 제출이 없습니다시간 제한2초메모리 제한512 MB

문제

From the creators of "Alice and Bob (and string)" and "Alice and Bob (and string) Strikes Back"!

Alice and Bob are playing a game. Initially they have a string ss and its substring tt. Each player's turn consists of adding an arbitrary letter c_lc\_l to the left of tt and an arbitrary letter c_rc\_r to the right of TT in such a way that tt is still a substring of ss. The player who can't make a valid move loses. 

Alice moves first. Before she makes the first move, she has the right to choose the initial string tt. Of course, Alice wants to cheat and will choose such a string tt that will guarantee her victory (assuming both players act optimally), but she doesn't want Bob to suspect anything. Therefore, Alice decided to choose the kk-th lexicographically smallest string among all possible winning initial strings tt. Help Alice!

입력

The first line of input contains string ss of lowercase English letters (1s1051 \leq |s| \leq 10^5). 

The second line contains integer kk (1k10101 \leq k \leq 10^{10}).

출력

If there are less than kk suitable options for the string tt, print "no solution". Otherwise, print the kk-th lexicographically smallest one. If the answer is an empty string, print "-" instead.

힌트

Winning strings for s=abacs=\mathtt{abac} are -, a, b, ba.