Number
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 N (1 ≤ N ≤ 100), which represents the number of lines. Each of the following lines contains a sequence of 1 to 100 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.