Statement
Statement language
You want to split a string with no whitespace into several lines. Let be the number of printed lines and the number of characters on line . For some positive integer , we must have and for .
Use every character of exactly once and preserve their order. If this is impossible, print . If several valid splits exist, print one with the largest number of lines .
Input
The input is given in the following format:
Output
For each case, print the pieces of a valid split, one piece per line. If no split exists, print only on one line. Do not print the number of lines or separately.
Constraints
- .
- .
Subtasks
Samples
Input
3
abcdef
ab
xyzuvwx
Output
a
bc
def
0
x
yzuvwx