'''
@Author: your name
@Date: 2020-07-29 09:21:12
@LastEditTime: 2020-07-29 10:06:38
@LastEditors: Please set LastEditors
@Description: In User Settings Edit
@FilePath: \vscode_py\day23.py
'''

# Question 95
# 找到第二大的数
def Q95():
li=map(int,input().split(" ")) # str转为int
# print(li)
s=list(set(li))
print(s)
s.sort()
print(s[-2])



# Question 96
# 使用wrap切割字符串
import textwrap
def wrap(string,maxwidth):
string=textwrap.wrap(string,maxwidth)
string='\n'.join(string)
return string

# Question 97
# 打印对应的图形


# Question 98
# You are given a date. Your task is to find what the day is on that date.
# Use weekday function of calender module
import calendar
def Q98():
month,day,year=map(int,input().split())
dayId=calendar.weekday(year,month,day)
print(calendar.day_name[dayId].upper())

# Question 99
# 打印两组数的差异
def Q99():
n=int(input())
set1=set(map(int,input().split()))
print("set1:{}".format(set1))

m=int(input())
set2=set(map(int,input().split()))
print("set2:{}".format(set2))

ans=list(set1^set2)
ans.sort()
for i in ans:
print(i)



if __name__ == "__main__":
# Q95()

# string,width=input(),int(input())
# result=wrap(string,width)
# print(result)

# Q98()

Q99()