You are given an integer array of length . You have to find of element for all .
of the element is the minimum element greater than or equal to which is not present in array till the index.
Input Format:
First line contains an integer denoting the size of array.
Next line contains integers denoting the elements of the array.
Output Format:
Print integers. element should be the of the array prefix till
Constraints:
For first test case mex of first index is 0. As it is note present in array
mex of second index is 2 as 0 and 1 is present in array.
mex of 3rd, 4th and 5th index is 2.