Artem has constructed a permutation p of n integers from 1 to n during the last Jinotega beer party. Kostya tried to guess it, but had no success. Then Artem gave some hints to Kostya: for each i=1,…,n, he told him two integers l_i≤r_i, meaning that element i is situated between positions l_i and r_i inclusively. Kostya is sure that the lexicographically smallest permutation satisfying these conditions is the one Artem has constructed. As it is too late, and Kostya's brain is not working as well as usually after several glasses of beer, you need to help him.
The first line of input contains a positive integer n (1≤n≤2⋅105), the length of the permutation.
Each of the next n lines contain two integers l_i and r_i (1≤l_i≤r_i≤n).
If it is impossible to reconstruct the permutation, print a line containing the integer −1.
Otherwise, print a line containing n space-separated integers p_1,p_2,…,p_n: the desired permutation.