Given an array, print the Next Greater Element for every element. The Next greater Element for an element X is the first greater element on the right side of X in array. Elements for which no greater element exist, consider next greater element as -1.
INPUT
First line contains one integer N denoting the size of array.
Second line contains N integers.
OUTPUT
Output N integers each denoting the Next greater element in the array.
CONSTRAINTS
1≤N≤105
1≤Ai≤106