a = [];
for i in range(0, 10):
	a.append(int(input()));
	
a.sort(reverse = True);
for i in range(0, 3):
	print(a[i]); a = [] a [] for i in range(0, 10):
	a.append(int(input()));
	 i range(0, 10) range 0 10 a.append(int(input())) a.append a append int(input()) int input() input a.sort(reverse = True) a.sort a sort reverse = True reverse True for i in range(0, 3):
	print(a[i]); i range(0, 3) range 0 3 print(a[i]) print a[i] a i a = [] [] a
a = [];
for i in range(0, 10):
	a.append(int(input()));
	
a.sort(reverse = True);
for i in range(0, 3):
	print(a[i]);