Skip to main content

~/algor $ cat contests/round-9/I

I. Largest number from the digits

Problem I ICPC rules 1000 ms 64 MB

A positive integer is given. Find the largest number that can be obtained by rearranging its digits (each digit is used as many times as it occurs; for example, ).

Building the largest number by sorting the digits in decreasing order

Input

One positive integer .

Output

One integer — the largest number obtained.

Note

Examples

Input #1
30521
Output #1
53210
Input #2
1000
Output #2
1000

Sign in to submit a solution

Signing up is free and takes a minute.