1750: 【CSP分支】计算密码▅

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:5 Solved:4

Description

某军事单位由于作战需要,需将一个六位数按规则重新转换后传递,转换规则是:先将六位数分为前三位和后三位,然后比较,将较大的三位数放在前面,较小的三位数放在后面,重新组成一个六位数;请编程帮助该单位计算出转换后的六位数。

比如:输入 lns="http://www.w3.org/1998/Math/MathML">687523,那么前三位数 lns="http://www.w3.org/1998/Math/MathML">687 ,后三位数lns="http://www.w3.org/1998/Math/MathML">523 ,由于前三位 lns="http://www.w3.org/1998/Math/MathML">> 后三位,因此不需要换位置,计算结果任然是 lns="http://www.w3.org/1998/Math/MathML">687523 ;

再比如:输入 lns="http://www.w3.org/1998/Math/MathML">123468 ,那么前三位是 lns="http://www.w3.org/1998/Math/MathML">123 ,后三位是lns="http://www.w3.org/1998/Math/MathML">468 ,由于前三位 lns="http://www.w3.org/1998/Math/MathML">< 后三位,因此需要换位置,得到新的 lns="http://www.w3.org/1998/Math/MathML">6 位数是 lns="http://www.w3.org/1998/Math/MathML">468123 。

Input

一个六位整数。

Output

输出按照规则计算的结果。

Sample Input Copy

687523

Sample Output Copy

687523