706. Largest Number

0

Medium

Given an array of non-negative integers, arrange them in a way that produces the largest possible number.

Input Format

The first line of the input should contain an integer n, which represents the size of the array. The second line should contain n space-separated integers, representing the elements of the array.

Output Format

Print the string representation of the largest number.

Example

Input

5 3 30 34 5 9

Output

9534330

Constraints

`1 <= n <= 100000` The result may be very large, so it is necessary to return a string instead of an integer.
Loading...

View Submissions

Console