Little Petya very much likes arrays consisting of *n* integers, where each of them is in the range from 1 to 10<sup class="upper-index">9</sup>, inclusive. Recently he has received one such array as a gift from his mother. Petya didn't like it at once. He decided to choose exactly one element from the array and replace it with another integer that also lies in the range from 1 to 10<sup class="upper-index">9</sup>, inclusive. It is not allowed to replace a number with itself or to change no number at all. 

After the replacement Petya sorted the array by the numbers' non-decreasing. Now he wants to know for each position: what minimum number could occupy it after the replacement and the sorting.
The first line contains a single integer *n* (1 ≤ *n* ≤ 10<sup class="upper-index">5</sup>), which represents how many numbers the array has. The next line contains *n* space-separated integers — the array's description. All elements of the array lie in the range from 1 to 10<sup class="upper-index">9</sup>, inclusive.
5
1 2 3 4 5
1 1 2 3 4
5
2 3 4 5 6
1 2 3 4 5
3
2 2 2
1 2 2
4
1 1 2 3
1 1 1 2
3
1 1 1
1 1 2
10
5 6 1 2 3 1 3 45 7 1000000000
1 1 1 2 3 3 5 6 7 45
4
1000000000 234765 3485636 385634876
1 234765 3485636 385634876
1
1
2
25
1 1 1 2 2 2 1 2 1 2 2 2 2 2 1 2 2 2 1 2 2 2 2 1 2
1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
2
2 1
1 1
3
1 2 1
1 1 1
1
2
1
1
4
1
3
1 1 2
1 1 1
2
1 2
1 1
2
1 3
1 1
2
1 1
1 2
2
5 5
1 5
1
5
1
n=int(input(""))
n in range (1,10**5)
m=input("")
l=m.split(" ")
l=list(map(int,l))
a=min(l)
b=max(l)
b1=l.index(b)
if b>1 and a>1:
    a=a-1
    l[b1]=a;
elif b>1 and a==1:
    l[b1]=a;
if b==1 and a==1:
    l[b1]=b+1;
l.sort()
print(" ".join(map(str,l)))
