#include <stdio.h>

int main() {
    
    int n = 0, m = 0, l = 0;
    
    int i, tmp;
    for (i = 1; i <= 10; i++) {
      
        scanf("%d", &tmp);
        if (n <= tmp) l = m; m = n; n = tmp; continue;
        if (m <= tmp) l = m; m = tmp; continue;
        if (l <= tmp) l = tmp; continue;
        
    }
    
    printf("%d\n%d\n%d\n", n, m, l);
    
    return 0;
}