Find the length of the longest contiguous segment in an array, in which if a given element $K$ is inserted, $K$ becomes the second largest element of that subarray.
-----Input:-----
- The first line will contain $T$, number of test cases. Then the test cases follow. 
- The first line of each test case contains two integers $N$ and $K$.
- The next line contains N space-separated integers Ai denoting the elements of the array.
-----Output:-----
Print a single line corresponding to each test case — the length of the largest segment.
-----Constraints-----
- $1 \leq T \leq 10$
- $1 \leq N \leq 10^6$
- $1 \leq Ai, K \leq 10^9$
- Sum of N across all test cases doesn't exceed $10^6$
-----Sample Input:-----
2
5 3
2 4 2 4 2
8 5
9 3 5 7 8 11 17 2
-----Sample Output:-----
5
3
-----EXPLANATION:-----
If 3 is inserted at anywhere in the array, it is the second largest element. Hence the maximum length is 5.
If 5 is inserted anywhere between 1st and 4th element, it is the second largest element. The length of such subarray is 3.
for i in range(int(input())):
 n,k = list(map(int,input().split()))
 a = list(map(int,input().split()))
 c,x,i1,i2,b = 0,0,0,0,list()
 for j in range(n):
  c += 1
  if a[j] > k :
   x += 1
   if x == 1 :i1 = j
   else:
    if a[j] == a[i1]:x -= 1
    else:i2 = j
  if x == 2 :
   x = 1
   b.append(c-1)
   c = i2-i1
   i1 = i2
   i2 = 0
  if j == n-1 and b == [ ]:b.append(n)
 print(max(b))
  
 


for i in range(int(input())):
 n,k = list(map(int,input().split()))
 a = list(map(int,input().split()))
 c,x,i1,i2,b = 0,0,0,0,list()
 for j in range(n):
  c += 1
  if a[j] > k :
   x += 1
   if x == 1 :i1 = j
   else:
    if a[j] == a[i1]:x -= 1
    else:i2 = j
  if x == 2 :
   x = 1
   b.append(c-1)
   c = i2-i1
   i1 = i2
   i2 = 0
  if j == n-1 and b == [ ]:b.append(n)
 print(max(b))
  
 

