#coding:utf-8

h = []
for i in range(10):
	h.append(int(input()))

h = sorted(h,reverse = True)
for i in h[:3]:
	print(i) h = [] h [] for i in range(10):
	h.append(int(input())) i range(10) range 10 h.append(int(input())) h.append h append int(input()) int input() input h = sorted(h,reverse = True) h sorted(h,reverse = True) sorted h reverse = True reverse True for i in h[:3]:
	print(i) i h[:3] h :3 3 print(i) print i h = [] [] h h = sorted(h,reverse = True) sorted(h,reverse = True) h
#coding:utf-8

h = []
for i in range(10):
	h.append(int(input()))

h = sorted(h,reverse = True)
for i in h[:3]:
	print(i)