Competitions

# 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

In a single line given the number of Vasily's marks (no more than 100), and then the marks themselves.

#### Output

Print the changed marks in the same order.

Time limit 1 second
Memory limit 128 MiB
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

Source Stage II Ukrainian School Olympiad 2011-2012, Berdichev