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

using namespace std;

vector<int> heights;
int input;

int main(){
 while(cin >> input) heights.push_back(input);
 sort(input.begin(), input.end());
 auto itr = input.end();
 cout << *itr << "\n" << *(itr-1) << "\n" << *(itr-2) << endl;

 return 0;
}