#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <iostream>
#include <cmath>
#include <queue>
#include <map>
#include <stack>
#include <list>
#include <vector>
using namespace std;
int Max1=-1;
int Max2=-1;
int Max3=-1;
int main()
{
	int n;
	while(scanf("%d",&n)!=EOF)
	{
		if(n>Max1)
		{
			Max3=Max2;
			Max2=Max1;
			Max1=n;
			continue;
		}
		if(n>Max2)
		{
			Max3=Max2;
			Max2=n;
			continue;
		}
		if(n>Max3)
		{
			Max3=n;
			continue;
		}
	}
	cout<<Max1<<endl<<Max2<<endl<<Max3<<endl;
	return 0;
}