import std.stdio;

void main(){
	int hills[10];
	int tmp;
	foreach(i; 0..10){ scanf("%d", &hills[i]); }

	int i, j;
	for(i = 0; i < hills.length - 1; i++){
		for(j = hills.length - 1; j > i; j--){
			if(hills[j - 1] < hills[j]){
				tmp = hills[j];
				hills[j] = hills[j - 1];
				hills[j - 1] = tmp;
			}
		}
	}
	foreach(e; hills[0..3]){
		writeln(e);
	}
}