#include <iostream>
#include <algorithm>
#include <string>
#include <stack>
#include <queue>
#include <set>
using namespace std;

int main()
{
	int a = 0 , s=0, d=0, f=0, g=0, h=0, j=0, k=0, l=0, z=0;
	cin >> a, s, d, f, g, h, j, k, l, z;
	int i[10] = { a, s, d, f, g, h, j, k, l, z };
	sort(i, i + 10);
	cout << i[10] << endl;
	cout << i[9] << endl;
	cout << i[8] << endl;

	
	return 0;
}