#include <iostream>
#include <vector>
#include <utility>
#include <string>
#include <algorithm>
#include <numeric>
#include <cmath>
#include <string.h>
#include <deque>
#define REP(i,j,n) for(int i=j;i<n;i++)
#define SORT(x) sort(x.begin(),x.end())

using namespace std;



int main() {
	vector<int> v(10000);
	for (int i = 0; i < v.size(); i++) {
		cin >> v[i];
	}

	sort(v.begin(), v.end());

	cout << v[9999] << endl << v[9998] << endl << v[9997] << endl;
	
	return 0;
}