#hell no
try:
    arr = map(int, raw_input().strip().split())
except (TypeError, ValueError):
    print "Invalid"
    exit(1)
    pass
r = 0
for i in arr:
    r ^= i
    pass
print r

c9df85b63785222ea7d502061d19b5a7cee7625a
#hell no
try:
    arr = map(int, raw_input().strip().split())
except (TypeError, ValueError):
    print "Invalid"
    exit(1)
    pass
r = 0
for i in arr:
    r ^= i
    pass
print r
