PROGRAMMING:The maximum value and the minimum value are placed at both ends
This problem requires the preparation of procedures, first input a series of integers in the minimum value and the last number exchange, and then the maximum value and the first number exchange, and finally output the sequence after the exchange.
###Input format:
In the first line, give a positive integer n (≤ 10), and in the second line, give n integers, separated by spaces.
###Output format:
Output the exchanged sequence in a row, each integer followed by a space.
###Input example:
Here is a set of inputs. For example:
```in
six
10 8 1 4 6 7
```
###Output example:
```out
10 8 7 4 6 1
```
answer:If there is no answer, please comment
###Input format:
In the first line, give a positive integer n (≤ 10), and in the second line, give n integers, separated by spaces.
###Output format:
Output the exchanged sequence in a row, each integer followed by a space.
###Input example:
Here is a set of inputs. For example:
```in
six
10 8 1 4 6 7
```
###Output example:
```out
10 8 7 4 6 1
```
answer:If there is no answer, please comment