~/algor $ cat problems/saralash-eng-katta-son-tuzish
Largest number
Medium
1000 ms
128 MB
60%
$n$ non-negative integers are given. They are written (glued) one after another in some order, forming one number. Print the largest number that can be formed. For example, $3, 30, 34, 5, 9$ give $9534330$. Print the answer without unnecessary leading zeros.
Input
The first line contains a positive integer $n$. The second line contains $n$ integers $a_{i}$ separated by spaces.
Output
One number — the largest number that can be formed.
Note
$1 \le n \le 10^{5}$
$0 \le a_{i} \le 10^{9}$
the numbers have no unnecessary leading zeros
Examples
Input #1
5 3 30 34 5 9
Output #1
9534330
Input #2
2 0 0
Output #2
0