Problem1684--small,middle,big

1684: small,middle,big

[Creator : ]
Time Limit : 1 sec  Memory Limit : 128 MB

Description

    There is a list consisting of N numbers, guaranteed order(ascending or descending). Please calculated the maximun, median, and mininum values of this set of test data and output there numbers in the order from largest to smallest.

Input

    The fist line consist of one number N and the second line consist of N ordered numbers.

Output

One line consist of there numbers, the largest, the middle, the smallest. For fractions possibly, output the result of rounding to one decimal place.

Sample Input Copy

4
-2 -1 3 4

Sample Output Copy

4 1 -2

Source/Category