#include <cstdio>
#include <queue>
#include <vector>

using namespace std;


int main(){
	priority_queue<int> q;
	int self;
	for(int i=0;i<10;i++){
		scanf("%d",&self);
		q.push(self);
	}
	printf("%d\n",q.top());
	q.pop();
	printf("%d\n",q.top());
	q.pop();
	printf("%d\n",q.top());
	q.pop();
	return 0;
}