'''
Task 
Given2 sets of integers, M and N, print their symmetric difference in ascending order.
The term symmetric difference indicates those values that exist in either M or N but do not exist in both.
'''

n=int(input())
a=set(map(int,input().split()))
m=int(input())
b=set(map(int,input().split()))
common=a.intersection(b)
uncommon=a.union(b)
li=[]
li=[i for i in uncommon if i not in common]

li.sort()
for i in li:
    print(i)

21353ed527fc090bd0ce1a22d3ba9890173b6670
<mask token>

<mask token>
li.sort()
for i in li:
    print(i)

<mask token>
n = int(input())
a = set(map(int, input().split()))
m = int(input())
b = set(map(int, input().split()))
common = a.intersection(b)
uncommon = a.union(b)
li = []
li = [i for i in uncommon if i not in common]
li.sort()
for i in li:
    print(i)

'''
Task 
Given2 sets of integers, M and N, print their symmetric difference in ascending order.
The term symmetric difference indicates those values that exist in either M or N but do not exist in both.
'''

n=int(input())
a=set(map(int,input().split()))
m=int(input())
b=set(map(int,input().split()))
common=a.intersection(b)
uncommon=a.union(b)
li=[]
li=[i for i in uncommon if i not in common]

li.sort()
for i in li:
    print(i)
