#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main() {
  int mountain[10];
  cin << mountain[10];
  sort(mountain[10]);
  cout << mountain[1] << endl;
  cout << mountain[2] << endl;
  cout << mountain[3] << endl;
}