import std.stdio;
import std.conv;
import std.string;

int main(string[] argv)
{
	immutable MAX_HIGHT = 10000;

    int[] hill;
	int count = 0;

	//??\???
	while(count < 10){
		int temp = readln().chomp().to!int();
		if(0 <= temp && temp <= MAX_HIGHT){
			hill ~= temp;
			count++;
		}
	}

	//?????????
	int temp;
	for(uint i = 0;i < hill.length-1;i++){
		for(uint j = hill.length-1;j > i;j--){
			if(hill[j-1] < hill[j]){
				temp = hill[j];
				hill[j] = hill[j-1];
				hill[j-1] = temp;
			}
		}
	}

	//??????
	for(int i = 0;i < 3;i++){
		writeln(hill[i]);
	}

    return 0;
}