#include <stdio.h>

int main(void) {
    int scores[10];
    int data[10];

    for (int i = 0; i < 10; i++) {
        scanf("%d", &scores[i]);
        data[i] = i + 1;
    }

    for (int i = 0; i < 9; i++) {
        for (int j = i + 1; j < 10; j++) {
            if (scores[i] < scores[j]) {
                int temp = scores[i];
                scores[i] = scores[j];
                scores[j] = temp;
                int tempIndex = data[i];
                data[i] = data[j];
                data[j] = tempIndex;
            }}}
    printf("合格者:\n");
    for (int i = 0; i < 3; i++) {
        printf("%d人目 %d点\n", data[i],scores[i]);
    }

    return 0;
}