a = int(input())
b = int(input())
c = int(input())
if a > b:
if a > c:
print(a)
else:
print(c)
if b > c:
print(b)
a = int(input())
b = int(input())
c = int(input())
if a > b:
if a > c:
print(a)
else:
print(c)
else:
if b > c:
print(b)
else:
print(c)