Chef has an array of N natural numbers most of them are repeated. Cheffina challenges chef to find all numbers(in ascending order) whose frequency is strictly more than K.

-----Input:-----
- First-line will contain $T$, the number of test cases. Then the test cases follow. 
- Each test case contains two lines of input, two integers $N, K$.
- N space-separated natural numbers.

-----Output:-----
For each test case, output in a single line answer.

-----Constraints-----
- $1 \leq T \leq 10$
- $1 \leq N, K \leq 10^5$
- $1 \leq arr[i] \leq 10^5$

-----Sample Input:-----
1
5 1
5 2 1 2 5

-----Sample Output:-----
2 5

Starter code:

Solutions:
for _ in range(int(input())):
    n,k=[int(x) for x in input().split()]
    a=list(map(int,input().split()))
    dp=[0]*(max(a)+1)
    for _ in range(n):
        dp[a[_]]+=1
    for _ in range(1,len(dp)):
        if dp[_]>k:
            print(_,end=" ")
    print()

from collections import Counter
for _ in range(int(input())):
    a,b=map(int,input().split())
    ar=list(map(int,input().split()))
    ar=Counter(ar)
    dr=[]
    for i in ar:
        if(ar[i]>b):
            dr.append(i)
    dr.sort()
    print(*dr)

t = int(input())
for _ in range(t):
    n,k = map(int,input().split())
    l = list(map(int,input().split()))
    l.sort()
    count = 1
    a = []
    for i in range(n-1):
        if l[i]==l[i+1]:
            count += 1
        else:
            if count > k:
                a.append(l[i])
                count = 1
    if count >k:
        a.append(l[-1])
    print(*a)

# cook your dish here
import itertools as it
for case in range(int(input())):
    n,k=map(int,input().split())
    array=list(map(int,input().split()))
    array.sort()
    new_map=list(map(str,array))
    store=it.groupby(new_map,key=None)
    new_dict={item:len(list(length)) for item,length in store}
    
    for i,j in new_dict.items():
        if j>k:
            print(i,end=" ")
    
        
        
        
    


# cook your dish here
t = int(input())
while t:
    n, k = map(int, input().split())
    arr = [int(i) for i in input().split()]
    d = {}
    for i in arr:
        if i in d:
            d[i] += 1
        else:
            d[i] = 1
    z = []
    for i in d:
        if d[i] > k:
            z.append(i)
    z.sort()
    print(*z)
    t -= 1

# cook your dish here
t = int(input())
while t:
    n, k = map(int, input().split())
    arr = [int(i) for i in input().split()]
    d = {}
    for i in arr:
        if i in d:
            d[i] += 1
        else:
            d[i] = 1
    z = []
    for i in d:
        if d[i] > k:
            z.append(i)
    z.sort()
    print(*z)
    t -= 1

for _ in range(int(input())):
    n,k=[int(x) for x in input().split()]
    a=list(map(int,input().split()))
    dp=[0]*(max(a)+1)
    for _ in range(n):
        dp[a[_]]+=1
    for _ in range(1,len(dp)):
        if dp[_]>k:
            print(_,end=" ")
    print()        
        

t=int(input())
for i in range(t):
    n,k=list(map(int,input().split()))
    arr=[int(x) for x in input().split()]
    d={}
    for i in arr:
        if i in d:
            d[i]=d[i]+1
        else:
            d[i]=1
    l=[]
    for i in list(d.keys()):
        if d[i]>k:
            l.append(i)
    l.sort()
    print(*l)


import sys
input = lambda: sys.stdin.readline().rstrip("\r\n")
inp = lambda: list(map(int,sys.stdin.readline().rstrip("\r\n").split()))
#______________________________________________________________________________________________________
# from math import *
# from bisect import *
# from heapq import *
# from collections import defaultdict as dd
# from collections import OrderedDict as odict
from collections import Counter as cc
# from collections import deque
# sys.setrecursionlimit(2*(10**5)+100) this is must for dfs
mod = 10**9+7; md = 998244353
# ______________________________________________________________________________________________________
# segment tree for range minimum query
# sys.setrecursionlimit(10**5)
# n = int(input())
# a = list(map(int,input().split()))
# st = [float('inf') for i in range(4*len(a))]
# def build(a,ind,start,end):
# 	if start == end:
# 		st[ind] = a[start]
# 	else:
# 		mid = (start+end)//2
# 		build(a,2*ind+1,start,mid)
# 		build(a,2*ind+2,mid+1,end)
# 		st[ind] = min(st[2*ind+1],st[2*ind+2])
# build(a,0,0,n-1)
# def query(ind,l,r,start,end):
# 	if start>r or end<l:
# 		return float('inf')
# 	if l<=start<=end<=r:
# 		return st[ind]
# 	mid = (start+end)//2
# 	return min(query(2*ind+1,l,r,start,mid),query(2*ind+2,l,r,mid+1,end))
# ______________________________________________________________________________________________________
# Checking prime in O(root(N))
# def isprime(n):
#     if (n % 2 == 0 and n > 2) or n == 1: return 0
#     else:
#         s = int(n**(0.5)) + 1
#         for i in range(3, s, 2):
#             if n % i == 0:
#                 return 0
#         return 1
# def lcm(a,b):
#   return (a*b)//gcd(a,b)
# ______________________________________________________________________________________________________
# nCr under mod
# def C(n,r,mod):
#   if r>n:
#       return 0
#   num = den = 1
#   for i in range(r):
#       num = (num*(n-i))%mod
#       den = (den*(i+1))%mod
#   return (num*pow(den,mod-2,mod))%mod
# M = 10**5 +10
# ______________________________________________________________________________________________________
# For smallest prime factor of a number
# M = 1000010
# pfc = [i for i in range(M)]
# def pfcs(M):
#   for i in range(2,M):
#       if pfc[i]==i:
#           for j in range(i+i,M,i):
#               if pfc[j]==j:
#                   pfc[j] = i
#   return
# pfcs(M)
# ______________________________________________________________________________________________________
tc = 1
tc, = inp()
for _ in range(tc):
	n,k = inp()
	a = inp()
	b = cc(a)
	ans = []
	for i in b.keys():
		if b[i]>k:
			ans.append(i)
	ans.sort()
	print(*ans)

from collections import Counter

for _ in range(int(input())):
    n, k = map(int, input().split())
    a = list(map(int, input().split()))

    c = Counter(a)

    x = []
    for i in c:
        if c[i] > k:
            x.append(i)

    print(*sorted(x))

from sys import stdin, stdout
from math import floor, gcd, fabs, factorial, fmod, sqrt, inf, log
from collections import defaultdict as dd, deque
from heapq import merge, heapify, heappop, heappush, nsmallest
from bisect import bisect_left as bl, bisect_right as br, bisect
mod = pow(10, 9) + 7
mod2 = 998244353
def inp(): return stdin.readline().strip()
def out(var, end="\n"): stdout.write(str(var)+"\n")
def outa(*var, end="\n"): stdout.write(' '.join(map(str, var)) + end)
def lmp(): return list(mp())
def mp(): return map(int, inp().split())
def smp(): return map(str, inp().split())
def l1d(n, val=0): return [val for i in range(n)]
def l2d(n, m, val=0): return [l1d(n, val) for j in range(m)]
def remadd(x, y): return 1 if x%y else 0
def ceil(a,b): return (a+b-1)//b

def isprime(x):
    if x<=1: return False
    if x in (2, 3): return True
    if x%2 == 0: return False
    for i in range(3, int(sqrt(x))+1, 2):
        if x%i == 0: return False
    return True

for _ in range(int(inp())):
    n, s = mp()
    a = lmp()
    md = {}
    for i in a:
        if i in md: md[i]+=1
        else: md[i]=1
    ansl = []
    for k, v in md.items():
        if v>s: ansl.append(k)
    print(*sorted(ansl))

from sys import*
input=stdin.readline
t=int(input())
for _ in range(t):
    n,k=map(int,input().split())
    l=[int(x) for x in input().split()]
    mp={}
    for items in l:
        try:
            mp[items]+=1
        except:
            mp[items]=1
    l=list(set(l))
    l.sort()
    for items in l:
        if mp[items]>k:
            print(items,end=" ")
    print() 
  

# cook your dish here
from collections import Counter

for j in range(int(input())):
    n,k = map(int,input().split())
    a=[int(x) for x in input().split()]
    z=Counter(a)
    p=[]
    for i in z:
        if z[i]>k:
            p.append(i)
    print(*sorted(p))