The last the largest#8962

The last the largest

1 second
128 megabytes
Very easy

Given array of integers. Find the largest element of the array that occurs the last and swap it with the last element in the array without changing the order of other elements.

Input

First line contains positive integer . Next line contains integers. All numbers do not exceed by absolute value.

Output

Print the elements of updated array.

Examples

Example 1

Loading
Loading