Company: Gep_worldwide
Difficulty: medium
Game of String Distribution Problem Description Joe has organised a party for M guests and has planned a game. He hands out a string S and explains the rules: the characters of S are distributed among the M guests so that every guest receives at least one character; each guest arranges the characters they received into a word, in any order they like; for that distribution, the lexicographically smallest of the M words is written down. Every possible distribution produces one written-down word. Among all of those, the lexicographically largest one is called the strongest string. Return the strongest string. A word x is lexicographically smaller than a word y when x is a prefix of y , or when at the first position where they differ the character of x comes earlier in the alphabet. Implement solve , which receives M and S and returns the strongest string. Input Format The first line contains the integer M , the number of guests. The second line contains the string S , made of lowercase En