import operator

k = int(input())
out = list(map(int, input().split()))
for i in range(0, k - 1):
    add = list(map(int, input().split()))
    out = list(map(lambda xy: operator.xor(xy[0], xy[1]), zip(out, add)))
print(*out)
