Alice has an array A of length N which is initially a *permutation*. She dislikes K numbers which are B_{1}, B_{2}, \ldots, B_{K} all of which are distinct. Therefore, she removes all the occurrences of these numbers from A. The order of the remaining elements of the A does not change. 

Can you find out the resulting array A?

Note: A *permutation* of length N is an array where every integer from 1 to N occurs exactly once.

------ Input Format ------ 

- The first line contains a single integer T — the number of test cases. Then the test cases follow.
- The first line of each test case contains an integer N — the size of the array A.
- The second line of each test case contains N integers A_{1}, A_{2}, \ldots, A_{N} denoting the array A.
- The third line of each test case contains an integer K — the size of the array B.
- The fourth line of each test case contains K integers B_{1}, B_{2}, \ldots, B_{K} denoting the numbers which Alice dislikes.

------ Output Format ------ 

For each test case, output the resulting array A after the removal of all occurrences of B_{1}, B_{2}, \ldots B_{K}.

It is guaranteed that there will be at least one element in the resulting array.

------ Constraints ------ 

$1 ≤ T ≤ 1000$
$1 ≤ K < N ≤ 10^{5}$
$1 ≤A_{i}, B_{i} ≤N$
$A$ is initially a *permutation*.
$B_{i} \ne B_{j}$ when $(i \ne j)$
- Sum of $N$ over all test cases does not exceed $2 \cdot 10^{5}$.

----- Sample Input 1 ------ 
3
4
4 1 3 2
2
3 1
9
5 2 9 1 8 6 4 3 7
3
5 8 9
5
3 4 5 1 2
2
2 3

----- Sample Output 1 ------ 
4 2
2 1 6 4 3 7
4 5 1

----- explanation 1 ------ 
Test Case 1: Here $A = [4, 1, 3, 2]$ and $B = [3, 1]$. The resulting array $A$ after removing all the numbers which Alice dislikes is $[4, 2]$.

Note that here $[2, 4]$ is an incorrect answer since the order of elements should be the same as in the original array.

Test Case 2: Here $A = [5, 2, 9, 1, 8, 6, 4, 3, 7]$ and $B = [5, 8, 9]$. The resulting array $A$ after removing all the numbers which Alice dislikes is $[2, 1, 6, 4, 3, 7]$.

Test Case 3: Here $A = [3, 4, 5, 1, 2]$ and $B = [2, 3]$. The resulting array $A$ after removing all the numbers which Alice dislikes is $[4, 5, 1]$.

Difficulty: EASY

Solutions:
for _ in range(int(input())):
	N = int(input())
	A = list(map(int, input().split()))
	K = int(input())
	B = set(map(int, input().split()))
	C = [-1] * (N - K)
	j = 0
	for i in range(N):
		if A[i] not in B:
			C[j] = A[i]
			j += 1
	print(*C)


from collections import Counter, UserString
from math import log2
mod = lambda n: int(n % (10 ** 9 + 7))
_fc = [1]
for i in range(1, 1000001):
	_fc.append(i * _fc[i - 1])
	_fc[i] = mod(_fc[i])

def fact(n):
	if -1000001 < n < 1000001:
		if n > -1:
			return _fc[n]
		else:
			return int('-' + str(_fc[abs(n)]))
	else:
		raise ValueError('values only from 1000000 to -1000000 can be factorialized\n')

def yn(b, caps=False, y='Yes', n='No'):
	if b:
		returning = y
	else:
		returning = n
	if caps == 2:
		return returning.lower()
	elif caps:
		return returning.upper()
	return returning

def prob(l, n):
	return l.count(n) / len(l)

def isSubseq(s1, s2):
	(n, m) = (len(s1), len(s2))
	(i, j) = (0, 0)
	while i < n and j < m:
		if s1[i] == s2[j]:
			i += 1
		j += 1
	return i == n

def isPrime(n):
	if n > 1:
		for i in range(2, int(n ** 0.5) + 1):
			if not n % i:
				return False
		else:
			return True
	return True

def percentDiff(n, diff):
	return n + n * (diff / 100)

def prodLst(l1, nl):
	if isinstance(nl, int):
		return [i * nl for i in l1]
	else:
		return [i * j for (i, j) in zip(l1, nl)]

def divLst(l1, nl, mxMn=False):
	if isinstance(nl, int):
		return [i // nl for i in l1]
	elif mxMn:
		return [max(i, j) // min(i, j) for (i, j) in zip(l1, nl)]
	else:
		return [i // j for (i, j) in zip(l1, nl)]

def modLst(l, n):
	return [i % n for i in l]

def sumLst(l1, nl):
	if isinstance(nl, int):
		return [i + nl for i in l1]
	else:
		return [i + j for (i, j) in zip(l1, nl)]

def absLst(l):
	return [abs(i) for i in l]

def diffLst(l1, nl, isAbs=False):
	if isinstance(nl, int):
		returning = [i - nl for i in l1]
	else:
		returning = [i - j for (i, j) in zip(l1, nl)]
	if isAbs:
		return absLst(returning)
	else:
		return returning

def remCommonOccurs(l, rl):
	srl = set(rl)
	returning = []
	for i in l:
		if i not in rl:
			returning.append(i)
	return returning

def remPosNeg(l, posNeg=False):
	returning = []
	if not posNeg:
		for i in l:
			if i >= 0:
				returning.append(i)
	else:
		for i in l:
			if i < 0:
				returning.append(i)
	return returning

def flip(nl):
	if isinstance(nl, int):
		return -nl
	elif isinstance(nl, list):
		return [-i for i in nl]

def ev(n):
	return not n & 1

def decimal(n):
	return round(n + 0.5)

def printabs(n):
	print(abs(n))

def printm(n):
	print(mod(n))

def printy(b, caps=False, y='Yes', n='No'):
	print(yn(b, caps, y, n))

class mutableStr(UserString):

	def ins(self, n, s):
		if n < 0:
			self.data = self.data = ''.join(list(self.data)[:n + 1]) + s + ''.join(list(self.data)[n + 1:])
		else:
			self.data = ''.join(list(self.data)[:n]) + s + ''.join(list(self.data)[n:])

	def rem(self, s):
		self.data = self.data.replace(s, '')
alphabetOrd = [97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122]
alphabet = list('abcdefghijklmnopqrstuvwxyz')
bint = lambda b: int(b, 2)
r2 = lambda n: range(1, n + 1)
rl = lambda *l: range(len(l[0])) if len(l) == 1 else range(l[0], len(l[1]))
alph = lambda s: s.isalpha()
sl = lambda l: list(set(l))
inf = float('inf')
soi = lambda : sorted(input())
ii = lambda : int(input())
li = lambda : list(map(int, input().split()))
si = lambda : mutableStr(str(input()))
lsi = lambda : list(input())
sepi = lambda : map(int, input().split())
seti = lambda : set(map(int, input().split()))
for t in range(int(input())):
	lenOfLst = ii()
	lst = li()
	lenOfDislikes = ii()
	dislikes = seti()
	ans = remCommonOccurs(lst, dislikes)
	print(*ans)


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	forbidden = [False] * (len(a) + 1)
	k = int(input())
	b = list(map(int, input().split()))
	for v in b:
		forbidden[v] = True
	good = []
	for v in a:
		if not forbidden[v]:
			good += [v]
	print(*good)


r = int(input())
while r > 0:
	r = r - 1
	aa = int(input())
	aar = list(map(int, input().split()))
	sa = int(input())
	sar = list(map(int, input().split()))
	par = set(sar)
	z = []
	for i in aar:
		if i not in par:
			z.append(i)
	print(*z)


for i in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	m = int(input())
	b = list(map(int, input().split()))
	c = set(b)
	l = []
	for i in a:
		if i not in c:
			l.append(i)
	print(*l)


for _ in range(int(input())):
	a_len1 = int(input())
	a1 = list(map(int, input().split(' ')))
	a_len2 = int(input())
	a2 = set(map(int, input().split(' ')))
	ans = [sublist for sublist in a1 if sublist not in a2]
	print(*ans)


T = int(input())
for _ in range(T):
	n = int(input())
	a = list(map(int, input().split()))
	k = int(input())
	b = set(map(int, input().split()))
	l = []
	for i in a:
		if i not in b:
			l.append(i)
	print(*l)


for _ in range(int(input())):
	n = int(input())
	lst1 = list(map(int, input().split()))
	k = int(input())
	lst2 = set(map(int, input().split()))
	lst3 = []
	for item in lst1:
		if item not in lst2:
			lst3.append(item)
	print(*lst3)


occurance = int(input())
for j in range(occurance):
	arr_len = int(input())
	arr_a = list(map(int, input().split()))
	b = int(input())
	del_arr = set(map(int, input().split()))
	updated_arr = []
	for i in arr_a:
		if i not in del_arr:
			updated_arr.append(i)
	print(*updated_arr)


for i in range(int(input())):
	x = int(input())
	x1 = list(map(int, input().split()))
	y = int(input())
	y1 = set(map(int, input().split()))
	list1 = [ele for ele in x1 if ele not in y1]
	print(*list1)


t = int(input())
for i in range(t):
	n = int(input())
	l = []
	l2 = []
	l = list(map(int, input().split()))
	s = set(l)
	m = int(input())
	li = list(map(int, input().split()))
	for i in li:
		if i in s:
			s.remove(i)
	for i in l:
		if i in s:
			l2.append(i)
	print(*l2)


def solve():
	t = int(input())
	for _ in range(t):
		n = int(input())
		l = list(map(int, input().split()))
		k = int(input())
		b = set(map(int, input().split()))
		c = [i for i in l if i not in b]
		print(*c)
solve()


for i in range(int(input())):
	n = int(input())
	li = list(map(int, input().split()))
	m = int(input())
	b = set(list(map(int, input().split())))
	out = []
	for k in li:
		if k not in b:
			out.append(k)
	print(*out)


for i in range(int(input())):
	n = int(input())
	li = list(map(int, input().split()))
	m = int(input())
	b = list(map(int, input().split()))
	b.sort()
	out = []
	for k in li:
		boo = False
		(i, j) = (0, m - 1)
		while i <= j:
			mid = (i + j) // 2
			if b[mid] < k:
				i = mid + 1
			elif b[mid] > k:
				j = mid - 1
			else:
				boo = True
				break
		if not boo:
			out.append(k)
	print(*out)


for _ in range(int(input())):
	x = int(input())
	l = list(map(int, input().split()))
	y = int(input())
	k = list(map(int, input().split()))
	z = [0] * x
	tl = []
	for i in range(y):
		z[k[i] - 1] = 1
	for i in l:
		if z[i - 1] != 1:
			tl.append(i)
	print(*tl)


for _ in range(int(input())):
	N = int(input())
	A = [x for x in input().split()]
	K = int(input())
	B = set([x for x in input().split()])
	print(*[a for a in A if a not in B])


t = int(input())
for i in range(t):
	n = int(input())
	a = list(input().split())
	k = int(input())
	b = list(input().split())
	b = set(b)
	x = [i for i in a if i not in b]
	print(*x)


for i in range(0, int(input())):
	n = int(input())
	l = list(input().split())
	k = int(input())
	m = list(input().split())
	m = set(m)
	z = [ele for ele in l if ele not in m]
	print(*z)


tc = int(input())
for i in range(tc):
	a = int(input())
	x = list(map(int, input().split()))
	b = int(input())
	y = set(map(int, input().split()))
	o = []
	for j in x:
		if j in y:
			continue
		else:
			o.append(j)
	print(*o)


import numpy as np
for i in range(int(input())):
	int(input())
	a = [int(x) for x in input().split()]
	int(input())
	b = set([int(x) for x in input().split()])
	a = [num for num in a if num not in b]
	print(*a)