CSES - Aalto Competitive Programming 2024 - wk9 - Mon - Matter++
  • Time limit: 1.00 s
  • Memory limit: 512 MB

Maija has discovered new matter! She has identified 26 new particles in total. Fortunately she has decided to spare herself and everyone else the effort and just named them with the lowercase Latin letters aza-z. The particles often appear in string formations and interact with each other in mysterious ways that Maija intends to uncover. Currently she has found that all strings have a potential that is equal to the squares of the different particles' cardinalities. Formally, the potential of a string ss that contains cntacnt_a aa-particles, cntbcnt_b bb-particles, \dots and cntzcnt_z zz-particles has a potential pots=cnta2+cntb2+...+cntz2pot_s = cnt_a^2 + cnt_b^2 + ... + cnt_z^2. The strings are quite volatile: if their potential falls short of WW, then they will immediately explode.

Maija is attempting to pick a sample from string ss. Find the shortest possible sample she can cut from it.

Input

The first line contains a single integer WW. The second line contains a string ss.

Output

Print the shortest possible sample. If there are multiple answers, print any.

Constraints

  • 1s1051 \leq |s| \leq 10^5
  • 1W10101 \leq W \leq 10^{10}
  • WpotsW \leq pot_s

Example 1

Input:

4
ccda

Output:

cc

Example 2

Input:

17
caacaabazz

Output:

aacaa