list = []
for i in range(0, 10):
    t = int(raw_input())
    list.append(t)

list.sort(reverse=True)
for i in range(0, 3):
    print list[i] list = [] list [] for i in range(0, 10):
    t = int(raw_input())
    list.append(t) i range(0, 10) range 0 10 t = int(raw_input()) t int(raw_input()) int raw_input() raw_input list.append(t) list.append list append t list.sort(reverse=True) list.sort list sort reverse=True reverse True for i in range(0, 3):
    print list[i] i range(0, 3) range 0 3 print list[i] list i t = int(raw_input()) int(raw_input()) t list = [] [] list
list = []
for i in range(0, 10):
    t = int(raw_input())
    list.append(t)

list.sort(reverse=True)
for i in range(0, 3):
    print list[i]