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

Задача 25958. Hacker Vasily


Задача

Темы:
Hacker Vasily got access to a cool magazine and wants to replace all his minimum grades with maximum ones. Write a program that replaces Vasily's grades, but vice versa (all the maximum ones are replaced by the minimum ones).
 
Input
The number of Vasily's ratings is given (no more than 100), then the ratings themselves.
 
Output
You want to print the corrected grades in the same order.

Enter Output
5 1 3 3 3 4 1 3 3 3 1
8 5 4 2 2 4 2 2 5 2 4 2 2 4 2 2 2