Company: ICICI
Difficulty: hard
Game of String Distribution Joe has organized a party for M guests and has planned a party game. Joe hands out a string S and explains the rules: The characters of S must be distributed among the M guests so that every character is given to exactly one guest and every guest receives at least one character . A guest writes the characters handed to them in non-decreasing order, and that word is the guest's string. (inferred — the source describes handing out characters but never fixes the order a guest writes them in; sorting makes a guest's word depend only on which characters they received, which is exactly what the rules describe.) For one distribution, compare the M guest strings and keep the lexicographically smallest one. Over all valid distributions, the lexicographically largest of the kept strings is the strongest string . Given M and S , print the strongest string. Input Format The first line contains a single integer M , the number of guests. The second line contains the strin