import java.util.Scanner;

class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int[] value = {0,0,0};
        for(int i = 0;i < 10;i++){
            int n = sc.nextInt();
            if(n > 0 && n <= 10000){
                for(int j = 0;j < 3;j++){
                    if(n > value[j]){
                        for(int k = 1;k >= j;k--){
                            value[k + 1] = value[k];
                        }
                        value[j] = n;
                        break;
                    }
                }
            }
        }
        sc.close();
        for(int i = 0;i < 3;i++){
            System.out.println(value[i]);
        }
    }
} import java.util.Scanner; Scanner java.util class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int[] value = {0,0,0};
        for(int i = 0;i < 10;i++){
            int n = sc.nextInt();
            if(n > 0 && n <= 10000){
                for(int j = 0;j < 3;j++){
                    if(n > value[j]){
                        for(int k = 1;k >= j;k--){
                            value[k + 1] = value[k];
                        }
                        value[j] = n;
                        break;
                    }
                }
            }
        }
        sc.close();
        for(int i = 0;i < 3;i++){
            System.out.println(value[i]);
        }
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int[] value = {0,0,0};
        for(int i = 0;i < 10;i++){
            int n = sc.nextInt();
            if(n > 0 && n <= 10000){
                for(int j = 0;j < 3;j++){
                    if(n > value[j]){
                        for(int k = 1;k >= j;k--){
                            value[k + 1] = value[k];
                        }
                        value[j] = n;
                        break;
                    }
                }
            }
        }
        sc.close();
        for(int i = 0;i < 3;i++){
            System.out.println(value[i]);
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int[] value = {0,0,0};
        for(int i = 0;i < 10;i++){
            int n = sc.nextInt();
            if(n > 0 && n <= 10000){
                for(int j = 0;j < 3;j++){
                    if(n > value[j]){
                        for(int k = 1;k >= j;k--){
                            value[k + 1] = value[k];
                        }
                        value[j] = n;
                        break;
                    }
                }
            }
        }
        sc.close();
        for(int i = 0;i < 3;i++){
            System.out.println(value[i]);
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int[] value = {0,0,0}; value {0,0,0} 0 0 0 for(int i = 0;i < 10;i++){
            int n = sc.nextInt();
            if(n > 0 && n <= 10000){
                for(int j = 0;j < 3;j++){
                    if(n > value[j]){
                        for(int k = 1;k >= j;k--){
                            value[k + 1] = value[k];
                        }
                        value[j] = n;
                        break;
                    }
                }
            }
        } int i = 0; int i = 0; i 0 i < 10 i 10 i++ i++ i {
            int n = sc.nextInt();
            if(n > 0 && n <= 10000){
                for(int j = 0;j < 3;j++){
                    if(n > value[j]){
                        for(int k = 1;k >= j;k--){
                            value[k + 1] = value[k];
                        }
                        value[j] = n;
                        break;
                    }
                }
            }
        } {
            int n = sc.nextInt();
            if(n > 0 && n <= 10000){
                for(int j = 0;j < 3;j++){
                    if(n > value[j]){
                        for(int k = 1;k >= j;k--){
                            value[k + 1] = value[k];
                        }
                        value[j] = n;
                        break;
                    }
                }
            }
        } int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc if(n > 0 && n <= 10000){
                for(int j = 0;j < 3;j++){
                    if(n > value[j]){
                        for(int k = 1;k >= j;k--){
                            value[k + 1] = value[k];
                        }
                        value[j] = n;
                        break;
                    }
                }
            } n > 0 && n <= 10000 n > 0 n 0 n <= 10000 n 10000 {
                for(int j = 0;j < 3;j++){
                    if(n > value[j]){
                        for(int k = 1;k >= j;k--){
                            value[k + 1] = value[k];
                        }
                        value[j] = n;
                        break;
                    }
                }
            } for(int j = 0;j < 3;j++){
                    if(n > value[j]){
                        for(int k = 1;k >= j;k--){
                            value[k + 1] = value[k];
                        }
                        value[j] = n;
                        break;
                    }
                } int j = 0; int j = 0; j 0 j < 3 j 3 j++ j++ j {
                    if(n > value[j]){
                        for(int k = 1;k >= j;k--){
                            value[k + 1] = value[k];
                        }
                        value[j] = n;
                        break;
                    }
                } {
                    if(n > value[j]){
                        for(int k = 1;k >= j;k--){
                            value[k + 1] = value[k];
                        }
                        value[j] = n;
                        break;
                    }
                } if(n > value[j]){
                        for(int k = 1;k >= j;k--){
                            value[k + 1] = value[k];
                        }
                        value[j] = n;
                        break;
                    } n > value[j] n value[j] value j {
                        for(int k = 1;k >= j;k--){
                            value[k + 1] = value[k];
                        }
                        value[j] = n;
                        break;
                    } for(int k = 1;k >= j;k--){
                            value[k + 1] = value[k];
                        } int k = 1; int k = 1; k 1 k >= j k j k-- k-- k {
                            value[k + 1] = value[k];
                        } {
                            value[k + 1] = value[k];
                        } value[k + 1] = value[k] value[k + 1] value k + 1 k 1 value[k] value k value[j] = n value[j] value j n break; sc.close() sc.close sc for(int i = 0;i < 3;i++){
            System.out.println(value[i]);
        } int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
            System.out.println(value[i]);
        } {
            System.out.println(value[i]);
        } System.out.println(value[i]) System.out.println System.out System System.out value[i] value i String[] args args
import java.util.Scanner;

class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int[] value = {0,0,0};
        for(int i = 0;i < 10;i++){
            int n = sc.nextInt();
            if(n > 0 && n <= 10000){
                for(int j = 0;j < 3;j++){
                    if(n > value[j]){
                        for(int k = 1;k >= j;k--){
                            value[k + 1] = value[k];
                        }
                        value[j] = n;
                        break;
                    }
                }
            }
        }
        sc.close();
        for(int i = 0;i < 3;i++){
            System.out.println(value[i]);
        }
    }
}