Problem

10 /10


Insert an element before the maximum

Problem

Given an array of N elements (\(2<=N<=100\)). Insert a value before all elements equal to maximum value. 

Input
The first line contains the number N - the number of array elements. The second line contains the number a. The third line contains N numbers - the values ​​of the elements array.

Imprint
Print the resulting array on one line.
 
Examples
# Input Output
1 5
100
43  50  76  84 100 
43 50 76 84 100 100