a = []

for i in range(10):

    a.append(int(eval(input())))

a.sort()

print(("\n".join(list(map(str,a[9:6:-1])))))


a = []



while True:

    try:

        n = int(eval(input()))

        a.append(n)

    except:

        break



print((max(a)))

a.remove(max(a))

print((max(a)))

a.remove(max(a))

print((max(a)))

a = []
for i in range(10):
    a.append(int(eval(input())))
a.sort()
print(("\n".join(list(map(str, a[9:6:-1])))))

a = []
while True:
    try:
        n = int(eval(input()))
        a.append(n)
    except:
        break
print((max(a)))
a.remove(max(a))
print((max(a)))
a.remove(max(a))
print((max(a)))

-for i in range(10): -    a.append(int(eval(input()))) -a.sort() -print(("\n".join(list(map(str, a[9:6:-1]))))) +while True: +    try: +        n = int(eval(input())) +        a.append(n) +    except: +        break +print((max(a))) +a.remove(max(a)) +print((max(a))) +a.remove(max(a)) +print((max(a)))