e-olymp
favorite We need a little bit of your help to keep things running, click on this banner to learn more
Problems

First the smallest

First the smallest

Given an array of n integers. Find the smallest element of the array that occurs first and swap it with the first element of the array without changing the order of other elements.

Input

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

Output

Print the elements of updated array.

Time limit 1 second
Memory limit 128 MiB
Input example #1
7
6 -3 5 -5 -4 7 -5
Output example #1
-5 -3 5 6 -4 7 -5
Author Matviychuk Sergiy Volodymyrovych
Source "ABC programming"