Олимпиадный тренинг

Задача 22007. Pulling out the low


It is required to find the minimum element in the array, and put it  in the first place, and what was in the 1st place - in its place.
If there are several minimum numbers, then you need to change with the first one.  If the minimum number is already in 1st place, nothing needs to be changed.
 
Input
The number N is entered - the number of array elements (1<=N<=100),  and then - the array elements (numbers from 1 to 10000). 
 
Output
Required to display N numbers - array elements after permutation.
 
Examples
# Input Output
1
5
3 5 4 1 4
1 5 4 3 4