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

priority_queue<int> q;

int main(){
	int n;
	while(cin>>n) q.push(n);
	cout<<q.top()<<endl;
	q.pop();
	cout<<q.top()<<endl;
	q.pop();
	cout<<q.top()<<endl;
	return 0;
}