#!/bin/python3

#https://www.hackerrank.com/challenges/missing-numbers/problem

import sys

n = int(input().strip())
A = list(map(int, input().strip().split(' ')))

m = int(input().strip())
B = list(map(int, input().strip().split(' ')))

for element in A:
    if element in B:
        B.remove(element)
        
setA = set()
setA.update(B)
setA = list(setA)
setA.sort()

for element in setA:
    print(element, end=" ")
3fe633b9cd4642b08f89cd3bff98189f331927a8
<mask token>

<mask token>
for element in A:
    if element in B:
        B.remove(element)
<mask token>
setA.update(B)
<mask token>
setA.sort()
for element in setA:
    print(element, end=' ')

<mask token>
n = int(input().strip())
A = list(map(int, input().strip().split(' ')))
m = int(input().strip())
B = list(map(int, input().strip().split(' ')))
for element in A:
    if element in B:
        B.remove(element)
setA = set()
setA.update(B)
setA = list(setA)
setA.sort()
for element in setA:
    print(element, end=' ')

import sys
n = int(input().strip())
A = list(map(int, input().strip().split(' ')))
m = int(input().strip())
B = list(map(int, input().strip().split(' ')))
for element in A:
    if element in B:
        B.remove(element)
setA = set()
setA.update(B)
setA = list(setA)
setA.sort()
for element in setA:
    print(element, end=' ')

#!/bin/python3

#https://www.hackerrank.com/challenges/missing-numbers/problem

import sys

n = int(input().strip())
A = list(map(int, input().strip().split(' ')))

m = int(input().strip())
B = list(map(int, input().strip().split(' ')))

for element in A:
    if element in B:
        B.remove(element)
        
setA = set()
setA.update(B)
setA = list(setA)
setA.sort()

for element in setA:
    print(element, end=" ")