high=[0 for i in range(10)]
for i in range(10):
	high[i]=int(input())
	
ans=[0 for i in range(3)]
for i in range(3):
	ans[i]=max(high)
	high.remove(ans[i])
	print(ans[i]) 0 for i in range(10) for i in range(10) i range(10) range 10 for i in range(10) 0 high=[0 for i in range(10)] high [0 for i in range(10)] for i in range(10):
	high[i]=int(input())
	 i range(10) range 10 high[i]=int(input()) high[i] high i int(input()) int input() input 0 for i in range(3) for i in range(3) i range(3) range 3 for i in range(3) 0 ans=[0 for i in range(3)] ans [0 for i in range(3)] for i in range(3):
	ans[i]=max(high)
	high.remove(ans[i])
	print(ans[i]) i range(3) range 3 ans[i]=max(high) ans[i] ans i max(high) max high high.remove(ans[i]) high.remove high remove ans[i] ans i print(ans[i]) print ans[i] ans i ans=[0 for i in range(3)] [0 for i in range(3)] ans high=[0 for i in range(10)] [0 for i in range(10)] high
high=[0 for i in range(10)]
for i in range(10):
	high[i]=int(input())
	
ans=[0 for i in range(3)]
for i in range(3):
	ans[i]=max(high)
	high.remove(ans[i])
	print(ans[i])