list = []
for i in  range(10):
    a = input()
    list.append(a)
list = sorted(list)
for i in range(-1, -4, -1):
    print(list[i]) list = [] list [] for i in  range(10):
    a = input()
    list.append(a) i range(10) range 10 a = input() a input() input list.append(a) list.append list append a list = sorted(list) list sorted(list) sorted list for i in range(-1, -4, -1):
    print(list[i]) i range(-1, -4, -1) range -1 -4 -1 print(list[i]) print list[i] list i list = [] [] list a = input() input() a list = sorted(list) sorted(list) list
list = []
for i in  range(10):
    a = input()
    list.append(a)
list = sorted(list)
for i in range(-1, -4, -1):
    print(list[i])