#include<iostream>
#include<algorithm>
//#include<cmath>
using namespace std;
int main() {
	int i;
	int A[10001];
	for (i = 0; cin >> A[i]; i++);
	sort(A, A + i);
	cout << A[i - 1] << endl << A[i - 2] << endl << A[i - 3] << endl;
	return 0;
}