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

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

    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(int i = 0;i < INPUT - 1;i++){
		for(int j = INPUT - 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;
}