You are given two sets, $\mbox{A}$ and $\mbox{B}$. 

Your job is to find whether set $\mbox{A}$ is a subset of set $\mbox{B}$.
 
If set $\mbox{A}$ is subset of set $\mbox{B}$, print True.

If set $\mbox{A}$ is not a subset of set $\mbox{B}$, print False.

Input Format

The first line will contain the number of test cases, $\mathbf{T}$. 

The first line of each test case contains the number of elements in set $\mbox{A}$.

The second line of each test case contains the space separated elements of set $\mbox{A}$.

The third line of each test case contains the number of elements in set $\mbox{B}$.

The fourth line of each test case contains the space separated elements of set $\mbox{B}$.

Constraints

$\textbf{0}<T<21$ 
$0<\text{Number of elements in each set}<1001$

Output Format

Output True or False for each test case on separate lines.

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

Sample Output
True 
False
False

Explanation

Test Case 01 Explanation

Set $\mbox{A}$ = {1 2 3 5 6} 

Set $\mbox{B}$ = {9 8 5 6 3 2 1 4 7} 

All the elements of set $\mbox{A}$ are elements of set $\mbox{B}$. 

Hence, set $\mbox{A}$ is a subset of set $\mbox{B}$.

Difficulty: EASY
Tags: Data structures
Skill types: Data structures

Starter code:

Solutions:
for i in range(int(input())):
	a = int(input())
	A = set(input().split())
	b = int(input())
	B = set(input().split())
	print(B == A.union(B))


for n in range(int(input())):
	input()
	a = set(input().split())
	input()
	b = set(input().split())
	print(a.issubset(b))


for i in range(int(input())):
	(a, A, b, B) = (set(input().split()) if 1 == j % 2 else input() for j in range(4))
	print(B.union(A) == B)


for _ in range(int(input())):
	(a, s, d, f) = (input(), set(map(int, input().split())), input(), set(map(int, input().split())))
	print(set(s).issubset(f))


for i in range(int(input())):
	a = int(input())
	A = set(input().split())
	b = int(input())
	B = set(input().split())
	print(B.intersection(A) == A)


for _ in range(int(input())):
	(a, A, b, B) = (int(input()), set(input().split()), int(input()), set(input().split()))
	print(A.issubset(B))


for _ in range(int(input())):
	a = int(input())
	A = set(input().split())
	b = int(input())
	B = set(input().split())
	print(A == A.intersection(B))


for i in range(int(input())):
	a = int(input())
	A = set(input().split())
	b = int(input())
	B = set(input().split())
	print(not bool(A.difference(A.intersection(B))))


for i in range(int(input())):
	a = int(input())
	A = set(input().split())
	b = int(input())
	B = set(input().split())
	print('%s' % ('True' if A & B == A else 'False'))


for i in range(int(input())):
	a = int(input())
	A = set(input().split())
	b = int(input())
	B = set(input().split())
	print(False) if A - B else print(True)


for i in range(int(input())):
	a = int(input())
	A = set(input().split())
	b = int(input())
	B = set(input().split())
	print('True' if A.intersection(B) == A else 'False')


for i in range(int(input())):
	a = int(input())
	A = set(input().split())
	b = int(input())
	B = set(input().split())
	print(B == A | B)


for i in range(int(input())):
	a = int(input())
	A = set(map(int, input().split()))
	b = int(input())
	B = set(map(int, input().split()))
	print(A.issubset(B))


for i in range(int(input())):
	a = int(input())
	A = set(input().split())
	b = int(input())
	B = set(input().split())
	print('True' if len(A) == len(A.intersection(B)) else 'False')


for i in range(int(input())):
	a = int(input())
	A = set(map(int, input().split(' ')[0:a]))
	b = int(input())
	B = set(map(int, input().split(' ')[0:b]))
	print(A.issubset(B))


for i in range(int(input())):
	a = int(input())
	A = set(input().split())
	b = int(input())
	B = set(input().split())
	print(A < B)


for i in range(int(input())):
	a = int(input())
	A = set(input().split())
	b = int(input())
	B = set(input().split())
	print(True if len(A & B) == a else False)


for i in range(int(input())):
	a = int(input())
	A = set(input().split())
	b = int(input())
	B = set(input().split())
	print(A & B == A)


for i in range(int(input())):
	a = int(input())
	A = set(input().split())
	b = int(input())
	B = set(input().split())
	print(True) if A.issubset(B) else print(False)


for i in range(int(input())):
	a = int(input())
	A = set(input().split())
	b = int(input())
	B = set(input().split())
	print(len(B.difference(A)) == len(B) - len(A))


for i in range(int(input())):
	a = int(input())
	A = set(input().split())
	b = int(input())
	B = set(input().split())
	print(len(A & B) == len(A))


for i in range(int(input())):
	a = int(input())
	A = set(input().split())
	b = int(input())
	B = set(input().split())
	print('True') if A & B == A else print('False')


for i in range(int(input())):
	a = int(input())
	A = set(input().split())
	b = int(input())
	print(len(A.difference(set(input().split()))) == 0)


for i in range(int(input())):
	a = int(input())
	A = set(input().split())
	b = int(input())
	B = set(input().split())
	print(True) if not A - B else print(False)


for i in range(int(input())):
	a = int(input())
	A = set(input().split())
	b = int(input())
	B = set(input().split())
	print(a == len(A.intersection(B)))


for i in range(int(input())):
	a = int(input())
	A = set(input().split())
	b = int(input())
	B = set(input().split())
	print('True') if A | B == B else print('False')


for i in range(int(input())):
	input()
	a = set(map(int, input().split()))
	input()
	b = set(map(int, input().split()))
	print(len(a.difference(b)) == 0)


for i in range(int(input())):
	(a, A) = (int(input()), set(input().split()))
	(b, B) = (int(input()), set(input().split()))
	print(A & B == A)


for i in range(int(input())):
	a = int(input())
	A = set(input().split())
	b = int(input())
	B = set(input().split())
	print(A <= B)


for i in range(int(input())):
	a = int(input())
	A = set(input().split())
	b = int(input())
	B = set(input().split())
	print(A.issubset(B))


for i in range(int(input())):
	a = int(input())
	A = set(input().split())
	b = int(input())
	B = set(input().split())
	print(len(A.difference(B)) == 0)


for i in range(int(input())):
	a = int(input())
	A = set(input().split())
	b = int(input())
	B = set(input().split())
	print('True') if len(B - A) == len(B) - len(A) else print('False')


for i in range(int(input())):
	a = int(input())
	A = set(input().split())
	b = int(input())
	B = set(input().split())
	print(A & B == A and a < b)


for i in range(int(input())):
	a = int(input())
	A = set(input().split())
	b = int(input())
	B = set(input().split())
	print(not A - B)


for i in range(int(input())):
	a = int(input())
	A = set(input().split())
	b = int(input())
	B = set(input().split())
	print(A.intersection(B) == A)


for i in range(int(input())):
	a = int(input())
	A = set(input().split())
	b = int(input())
	B = set(input().split())
	print(B & A == A)


for i in range(int(input())):
	a = int(input())
	A = set(input().split())
	b = int(input())
	B = set(input().split())
	print(A | B == B)


for i in range(int(input())):
	input()
	a = set(input().split())
	input()
	b = set(input().split())
	print(a <= b)


for i in range(int(input())):
	a = int(input())
	A = set(input().split())
	b = int(input())
	B = set(input().split())
	print('True' if A.issubset(B) else 'False')


for i in range(int(input())):
	a = int(input())
	A = set(input().split())
	b = int(input())
	B = set(input().split())
	print(len(A - B) == 0)


for i in range(int(input())):
	a = int(input())
	A = set(input().split())
	b = int(input())
	B = set(input().split())
	print('True' if A <= B else 'False')


for i in range(int(input())):
	a = int(input())
	A = set(input().split())
	b = int(input())
	B = set(input().split())
	print(len(B.union(A)) <= len(B))


for t in range(int(input())):
	len_a = int(input())
	A = set(input().split())
	len_b = int(input())
	B = set(input().split())
	print(A.intersection(B) == A)


for i in range(int(input())):
	input()
	A = set(input().split())
	input()
	B = set(input().split())
	print(A <= B)


for i in range(int(input())):
	a = int(input())
	A = set(input().split())
	b = int(input())
	B = set(input().split())
	print(len(A) == len(A & B))


for i in range(int(input())):
	a = int(input())
	A = set(input().split())
	b = int(input())
	B = set(input().split())
	if len(A.difference(B)) == 0:
		print(True)
	else:
		print(False)


for i in range(int(input())):
	(a, A) = (int(input()), set(map(int, input().split())))
	(b, B) = (int(input()), set(map(int, input().split())))
	print(A.issubset(B))


for i in range(int(input())):
	a = int(input())
	s1 = list(map(int, input().split()))
	b = int(input())
	s2 = list(map(int, input().split()))
	print('True') if all((k in s2 for k in s1)) else print('False')