#include <iostream>
#include <cstdio>
#include <cstdlib>
using namespace std;

int main() {

	int a = 0, b = 0, c = 0, x;

	while ( ~scanf( "%d", &x ) ) {

		if ( x > a )
			c = b, b = a, a = x;
		else if ( x > b )
			c = b, b = x;
		else if ( x > c )
			c = x;
	}

	printf( "%d\n%d\n%d\n", a, b, c );

	return 0;
}