def ispresent(arr1,element):


t = int(input())
for i in range(t):
    l1, l2 = map(int,input().split())
    arr1 = list(map(int,input().split()))
    arr2 = list(map(int,input().split()))
    arr1.sort()
    arr2.sort()
    
