#include <iostream>

int mt[] = {
1819,
2003,
876,
2840,
1723,
1673,
3776,
2848,
1592,
922
};

int main() {
	int limit = 10000;
	for ( int j = 0; j < 3; j++ ) {
		int max = 0;
		for ( int i = 0; i < 10; i++ ) {
			if ( max < mt[ i ] && mt[ i ] < limit ) {
				max = mt[ i ];
			}
		}
		std::cout << max << std::endl;
		limit = max;
	}
}