#include <string>
#include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <utility>
#include <vector>


using namespace std;

int main(void) {
	int buf;
	vector<int> v(10);
	for(int i = 0; i < 10; i++){
		cin >> buf;
		v[i] = buf;
	}
	sort(v.begin(), v.end());
	cout << v[9] << endl;
	cout << v[8] << endl;
	cout << v[7] << endl;
}