Childrens Game#1305

Childrens Game

1 second
128 megabytes
Very easy

There are many number games for children. These games are easy to play, but creating them is not so simple. Here is one interesting game: each player is given positive integers. By concatenating these numbers in any order, the player can form a large number. For example, if given numbers: , , , , one can form numbers like , , , , , etc. In total, such numbers can be formed. However, is the largest possible number.

It may seem easy for you to find the answer, but is it just as simple for a child who is just learning numbers?

Input

Each test starts with a positive integer (n \leq 50). The next line contains positive integers. Input is terminated by n = 0, which should not be processed.

Output

For each test, print the largest number that can be obtained by concatenating all numbers.

Examples

Example 1

Loading
Loading