# import pypyjit # pypyjit.set_param('max_unroll_recursion=-1') import sys from itertools import combinations, permutations, product, accumulate, groupby from collections import defaultdict, deque, Counter from functools import reduce from operator import add, mul import heapq import bisect import math import copy # sys.setrecursionlimit(10 ** 9) input = lambda: sys.stdin.readline().rstrip() INF = float("inf") MOD = 10 ** 9 + 7 N = int(input()) A = list(input().split()) B = list(input().split()) a_counter = Counter(A) b_counter = Counter(B) for k, v in a_counter.items(): if b_counter[k] == v: continue else: print(k) exit()