#arc146a. [arc146_a]Three Cards
[arc146_a]Three Cards
Problem Statement
There are cards, numbered to .
Card has a positive integer written on it.
You can choose three of these cards and concatenate the integers written on them in any order you like to make a new integer. For example, if you choose cards with , , and written on them, you can make integers such as and .
Find the maximum integer you can make.
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the answer.
Sample Input 1
5
1 4 3 5 8
Sample Output 1
854
If you choose cards with , , and written on them, you can make , , , , , or .
You can make nothing greater than , so the answer is .
Sample Input 2
8
813 921 481 282 120 900 555 409
Sample Output 2
921900813