#include<iostream>
#include <stdio.h>
using namespace std;
 
int main(){
	int a[10];
    int fir=0;
	int sec=0;
	int thi=0;
	for(int i=0;i<10;i++){
	cin>>a[i];
	if(a[i]>fir){
	thi=sec;
	sec=fir;
	fir=a[i];}else
	if(a[i]>sec){
	thi=sec;
	sec=a[i];}else
	if(a[i]>thi){
	thi=a[i];}}
	cout<<fir<<endl<<sec<<endl<<thi<<endl;

	return 0;}
