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

hillheight.sort()

for i in range(0, 3):
	print(hillheight[-1-i]) hillheight = [] hillheight [] for i in range(0, 10):
	hillheight.append(int(raw_input())) i range(0, 10) range 0 10 hillheight.append(int(raw_input())) hillheight.append hillheight append int(raw_input()) int raw_input() raw_input hillheight.sort() hillheight.sort hillheight sort for i in range(0, 3):
	print(hillheight[-1-i]) i range(0, 3) range 0 3 print(hillheight[-1-i]) print hillheight[-1-i] hillheight -1-i -1 i hillheight = [] [] hillheight
hillheight = []
for i in range(0, 10):
	hillheight.append(int(raw_input()))

hillheight.sort()

for i in range(0, 3):
	print(hillheight[-1-i])