#K3481. Lexicographically Smallest Repeated String

    ID: 25392 Type: Default 1000ms 256MiB

Lexicographically Smallest Repeated String

Lexicographically Smallest Repeated String

Given a list of n strings, your task is to determine the lexicographically smallest string and then output a new string formed by repeating this smallest string a specific number of times. Let ( s ) be the selected smallest string. The output should be computed as: [ \text{result} = s \times \left( \left\lfloor \frac{100}{|s|} \right\rfloor + 1 \right), ] where ( |s| ) denotes the length of string ( s ) and ( \lfloor \cdot \rfloor ) represents the floor function. The input is read from the standard input and the output should be printed to the standard output.

inputFormat

The input begins with a single integer n (1 ≤ n ≤ 105), representing the number of strings. The next n lines each contain one non-empty string. Each string consists of lowercase English letters.

Note: The input must be read from stdin.

outputFormat

Print a single string which is the lexicographically smallest string from the input repeated \(\left(\lfloor100/|s|\rfloor+1\right)\) times, where \( s \) is that smallest string.

Note: The output must be written to stdout.

## sample
1
apple
appleappleappleappleappleappleappleappleappleappleappleappleappleappleappleappleappleappleappleappleapple