You are given two arrays A and B of length N.
For every index i in array A, find the length of the smallest subarray starting from index i such that there exist at least B[i] elements with a value greater than or equal to A[i] in the subarray. If no such subarray exists, then print −1.
Input format
Output format
Print N space-separated integers denoting the answer for every index in array A.
Constraints
1≤N≤3×1051≤A[i]≤1091≤B[i]≤N