A - Permute to Maximize 解説 /

実行時間制限: 2 sec / メモリ制限: 1024 MiB

配点 : 100

問題文

1 以上 9 以下の数字 A,B,C が与えられます。

A,B,C を好きな順番で並べて繋げることで作れる 3 桁の整数のうち、値が最大のものを求めてください。

制約

  • A,B,C1 以上 9 以下の数字

入力

入力は以下の形式で標準入力から与えられる。

A B C

出力

答えを出力せよ。


入力例 1

3 2 4

出力例 1

432

A,B,C を好きな順番で並べて繋げることで作れる 3 桁の整数は 324, 342, 234, 243, 432, 4236 通りであり、 このうち値が最大のものは 432 です。


入力例 2

7 7 7

出力例 2

777

777 のみを作ることができます。


入力例 3

9 1 9

出力例 3

991

Score : 100 points

Problem Statement

You are given three digits A,B,C between 1 and 9, inclusive.

Find the maximum value among all 3-digit integers that can be formed by arranging A,B,C in any order and concatenating them.

Constraints

  • A,B,C are digits between 1 and 9, inclusive.

Input

The input is given from Standard Input in the following format:

A B C

Output

Output the answer.


Sample Input 1

3 2 4

Sample Output 1

432

There are six 3-digit integers that can be formed by arranging A,B,C in any order and concatenating them: 324, 342, 234, 243, 432, 423; the maximum value among them is 432.


Sample Input 2

7 7 7

Sample Output 2

777

Only 777 can be formed.


Sample Input 3

9 1 9

Sample Output 3

991