a = int(input())
b = int(input())
if a == b :
print(0)
elif a > b :
print(a)
else :
print(b)
a, b = int(input()), int(input())
if a > b:
else:
a = int(input())
b = int(input())
if a == b :
print(0)
elif a > b :
print(a)
else :
print(b)
a, b = int(input()), int(input())
if a > b:
print(a)
else:
print(b)