#include<iostream>
#include<cstdio>
#include<vector>
#include<algorithm>

using namespace std;

int data;
int mountain[10];
int i=0;

int main(){
	while(i < 10){
		scanf("%d",&data);
		mountain[i] = data;
		i++;
	}

	sort(mountain, mountain + 10);

	for(int j=0;j<3;j++){
		printf("%d\n",mountain[j]);
	}

    return 0;
}