#include<bits/stdc++.h>
using namespace std;
#define mp make_pair
#define fi first
#define se second
#define ll long long
#define pb push_back

# define inOut(a,b) freopen(a,"r",stdin);freopen(b,"w",stdout);
# define RESET(a) memset(a,0,sizeof(a))
# define MEMO(a) memset(a,-1,sizeof(a))
# define DEBUG puts("Debug-Has-Come-Until-Here")


typedef pair<int,int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;

int main(){
	cin.tie(NULL);
	
	int height, max1(0), max2(0), max3(0);
	while(scanf("%d", &height) != EOF){
		if (height >= max1){
			max3 = max2;
			max2 = max1;
			max1 = height;
		}else if (height >= max2){
			max3 = max2;
			max2 = height;
		}else if (height >= max3){
			max3 = height;
		}
	}
	printf("%d\n%d\n%d\n", max1, max2, max3);

	return 0;
}