import java.io.PrintStream;
import java.util.*;
import java.util.Scanner ; 
import java.math.BigInteger;
import java.util.Arrays;
import java.text.DecimalFormat;


public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int [] a = new int[10];
        int n;
        
        for(int i = 0 ; i<10 ; i++){
            n = sc.nextInt();
            a[i]=n;
        }
        Arrays.sort(a);
        System.out.println(a[9]+"\n"+a[8]+"\n"+a[7]);
    }
} import java.io.PrintStream; PrintStream java.io import java.util.*; util.* java import java.util.Scanner ; Scanner java.util import java.math.BigInteger; BigInteger java.math import java.util.Arrays; Arrays java.util import java.text.DecimalFormat; DecimalFormat java.text public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int [] a = new int[10];
        int n;
        
        for(int i = 0 ; i<10 ; i++){
            n = sc.nextInt();
            a[i]=n;
        }
        Arrays.sort(a);
        System.out.println(a[9]+"\n"+a[8]+"\n"+a[7]);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int [] a = new int[10];
        int n;
        
        for(int i = 0 ; i<10 ; i++){
            n = sc.nextInt();
            a[i]=n;
        }
        Arrays.sort(a);
        System.out.println(a[9]+"\n"+a[8]+"\n"+a[7]);
    } main {
        Scanner sc = new Scanner(System.in);
        int [] a = new int[10];
        int n;
        
        for(int i = 0 ; i<10 ; i++){
            n = sc.nextInt();
            a[i]=n;
        }
        Arrays.sort(a);
        System.out.println(a[9]+"\n"+a[8]+"\n"+a[7]);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int [] a = new int[10]; a new int[10] 10 int n; n for(int i = 0 ; i<10 ; i++){
            n = sc.nextInt();
            a[i]=n;
        } int i = 0 ; int i = 0 ; i 0 i<10 i 10 i++ i++ i {
            n = sc.nextInt();
            a[i]=n;
        } {
            n = sc.nextInt();
            a[i]=n;
        } n = sc.nextInt() n sc.nextInt() sc.nextInt sc a[i]=n a[i] a i n Arrays.sort(a) Arrays.sort Arrays a System.out.println(a[9]+"\n"+a[8]+"\n"+a[7]) System.out.println System.out System System.out a[9]+"\n"+a[8]+"\n"+a[7] "\n" a[8] a[9]+"\n"+a[8]+"\n"+a[7] a[9] a 9 "\n" a[8] a 8 "\n" a[7] a 7 String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int [] a = new int[10];
        int n;
        
        for(int i = 0 ; i<10 ; i++){
            n = sc.nextInt();
            a[i]=n;
        }
        Arrays.sort(a);
        System.out.println(a[9]+"\n"+a[8]+"\n"+a[7]);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int [] a = new int[10];
        int n;
        
        for(int i = 0 ; i<10 ; i++){
            n = sc.nextInt();
            a[i]=n;
        }
        Arrays.sort(a);
        System.out.println(a[9]+"\n"+a[8]+"\n"+a[7]);
    }
} Main
import java.io.PrintStream;
import java.util.*;
import java.util.Scanner ; 
import java.math.BigInteger;
import java.util.Arrays;
import java.text.DecimalFormat;


public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int [] a = new int[10];
        int n;
        
        for(int i = 0 ; i<10 ; i++){
            n = sc.nextInt();
            a[i]=n;
        }
        Arrays.sort(a);
        System.out.println(a[9]+"\n"+a[8]+"\n"+a[7]);
    }
}