#include <iostream>
#include <vector>
#include <algorithm>
 
using namespace std;
 
vector<int> heights;
int input;
 
int main(){
 while(cin >> input) heights.push_back(input);
 sort(heights.begin(), heights.end());
 auto itr = heights.end()-1;
 cout << *itr << "\n" << *(itr-1) << "\n" << *(itr-2) << endl;
 
 return 0;
}