Problems
Contr-operation
Contr-operation
Hacker Vasily got an access to the class book and wants to change all his minimum marks to maximum. Write a program that changes Vasily's marks, but vice versa.
Input data
In a single line given the number of Vasily's marks (no more than 100), and then the marks themselves.
Output data
Print the changed marks in the same order.
Examples
Input example #1
5 1 3 3 3 4
Output example #1
1 3 3 3 1
Input example #2
8 5 4 2 2 4 2 2 5
Output example #2
2 4 2 2 4 2 2 2