Bob has an array A of size N, and he is very fond of two integers X and Y. Find the length of the longest subarray, such that it contains exactly X distinct integers and Y exist at least once in the subarray.
Input format
Output format
For each test case, print the length of the largest subarray, such that it contains exactly X distinct integers and Y exist at least once in the subarray in a new line.
Constraints
1≤T≤101≤N≤1050≤A[i]≤1051≤X,Y≤105
For test case 1: There exists only one subarray having exactly 2 distinct elements and having at least one occurrence of 1, i.e. [3,1] of length 2. Therefore, the answer will be 2.
For test case 2: 2 is not present in the whole array A. So, the answer is 0.