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

l.sort()
l.reverse()

for a in l[:3]:
	print a l = [] l [] for i in range(10):
	l.append(input()) i range(10) range 10 l.append(input()) l.append l append input() input l.sort() l.sort l sort l.reverse() l.reverse l reverse for a in l[:3]:
	print a a l[:3] l :3 3 print l = [] [] l
l = []
for i in range(10):
	l.append(input())

l.sort()
l.reverse()

for a in l[:3]:
	print a