#include <cstdio>
#include <algorithm>

const int MAX_N = 10000;
int n;
int a[MAX_N];

void solve(){
	std::sort(a, a + n);
	for(int i = 0; i < 3; i ++){
		printf("%d\n", a[n - 1 - i]);
	}
}

int main(int argc, char const *argv[]){
//	freopen("in.txt", "r", stdin);

	for(n = 0; scanf("%d", &a[n]) != EOF; n ++);
	solve();

	return 0;
}