Number#7298

Number

0.1 seconds
64 megabytes
Easy

Stepan decided to confess his love to Marysia. Being quite shy, he chose a unique method: encrypting his message as a large number on a long strip of paper. After writing it down, he left the strip in the room, confident that only he and Marysia would understand its significance, and went to fetch an envelope. However, while he was gone, a classmate entered the room and cut the strip into several pieces. Consequently, each piece now contains either a single digit or a sequence of consecutive digits.

Upon returning and seeing the strips cut, Stepan was at a loss—he couldn't recall the exact number he had written, only that it was very large. Your task is to help him determine the maximum possible number that could have been on the strip before it was cut.

Input

The first line contains a natural number (1 \leq N \leq 100), which represents the number of lines. Each of the following lines contains a sequence of to digits. It is guaranteed that at least one line starts with a non-zero digit.

Output

Output a single line containing the maximum number that could have been written on the strip before it was cut.

Examples

Example 1

Loading
Loading