#include <iostream>
#include <cstdio>
using namespace std;

int main() {
	int f=0,s=0,t=0,tmp;
	while(cin>>tmp, tmp!=EOF){
		if(f<tmp){f=tmp;}
		else if(s<tmp){s=tmp;}
		else if(t<tmp){t=tmp;}
	}
	cout<<f<<endl;
	cout<<s<<endl;
	cout<<t<<endl;
	return 0;
}