#include <studio.h>
#include <iostream>

intmain(){

int 1st, 2nd, 3rd, i, mou[10];

1st = 0;
2nd = 0;
3rd = 0;


for(i=1:i=<10:i++){
	cin >> mou[i];
	if(mou[i] > 1st){
		3rd = 2nd;
		2nd = 1st;
		1st = mou[i];
		break;
	}
	if(mou[i] > 2nd){
		3rd = 2nd;
		2nd = mou[i];
		break;
	}
	if(mou[i] > 3rd){
		3rd = mou[i];
		break;
	}
}

cout << 1st << "\n" << 2nd << "\n" << 3rd << endl;

return 0;
}