#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;int h,i;int main(){vector<int>l;for(i=0;i++<10;l.push_back(h))cin>>h;sort(l.begin(),l.end(),greater<int>());for(i=0;i++<3;)cout<<l.begin()[i-1]<<'\n';}