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

using namespace std;

int main(){
  vector<int> vi;
  for(int i=0;i<10;i++){
    int buf;
    cin >> buf;
    vi.push_back(buf);
  }

  sort(vi.begin(),vi.end());

  for(int i=1;i<=3;i++){
    cout<< vi[vi.size()-i] << endl;
  }
}