# -*- coding:utf-8 -*-

first = 0
second = 0
third = 0
i = 0

for i in range(0,10):
    line = int(input())
    
    if first < int(line):
        third = second
        second = first
        first = int(line)
    elif second < int(line):
        third = second
        second = int(line)
    elif third < int(line):
        third = int(line)
print(first)
print(second)
print(third) first = 0 first 0 second = 0 second 0 third = 0 third 0 i = 0 i 0 for i in range(0,10):
    line = int(input())
    
    if first < int(line):
        third = second
        second = first
        first = int(line)
    elif second < int(line):
        third = second
        second = int(line)
    elif third < int(line):
        third = int(line) i range(0,10) range 0 10 line = int(input()) line int(input()) int input() input if first < int(line):
        third = second
        second = first
        first = int(line)
    elif second < int(line):
        third = second
        second = int(line)
    elif third < int(line):
        third = int(line) first < int(line) first int(line) int line third = second third second second = first second first first = int(line) first int(line) int line elif second < int(line):
        third = second
        second = int(line)
     second < int(line) second int(line) int line third = second third second second = int(line) second int(line) int line elif third < int(line):
        third = int(line) third < int(line) third int(line) int line third = int(line) third int(line) int line print(first) print first print(second) print second print(third) print third second = 0 0 second third = second second third line = int(input()) int(input()) line first = 0 0 first second = int(line) int(line) second third = second second third first = int(line) int(line) first third = 0 0 third second = first first second i = 0 0 i third = int(line) int(line) third
# -*- coding:utf-8 -*-

first = 0
second = 0
third = 0
i = 0

for i in range(0,10):
    line = int(input())
    
    if first < int(line):
        third = second
        second = first
        first = int(line)
    elif second < int(line):
        third = second
        second = int(line)
    elif third < int(line):
        third = int(line)
print(first)
print(second)
print(third)