#include <cstdio>

void sort(int a, int b);

int hill[10];
int main() {
    int i;
    for (i = 0; i < 10; i++) {
        scanf("%d", &hill[i]);
    }
    sort(0, 9);
    for (i = 0; i < 3; i++) {
        printf("%d\n", hill[i]);
    }
}

void sort(int a, int b) {
     int left, right, temp, pivot;
     if ( a < b ) {
          left = a; right = b;
          pivot = hill[ (a + b) / 2];
          while (left <= right) {
                while ( hill[left] > pivot ) left++;
                while ( hill[right] < pivot ) right--;
                if ( left <= right) {
                     temp = hill[left];
                     hill[left] = hill[right];
                     hill[right] = temp;
                     left++;
                     right--;
                }
          }
          sort(a, right);
          sort(left, b);
     }
}