import java.util.Scanner;
class Main{
    public static void main(String[] a){
		Scanner in = new Scanner(System.in);
		int top, second, third, input;
		top = -1;
		second = -2;
		third = -3;
		for(int i=0; i<10; i++){
			input = in.nextInt();
			if(input>top){
				third = second;
				second = top;
				top = input;
			}else if(input>second){
				third = second;
				second = input;
			}else if(input>third){
				third = input;
			}
		}
		System.out.println(top);
		System.out.println(second);
		System.out.println(third);
    }
} import java.util.Scanner; Scanner java.util class Main{
    public static void main(String[] a){
		Scanner in = new Scanner(System.in);
		int top, second, third, input;
		top = -1;
		second = -2;
		third = -3;
		for(int i=0; i<10; i++){
			input = in.nextInt();
			if(input>top){
				third = second;
				second = top;
				top = input;
			}else if(input>second){
				third = second;
				second = input;
			}else if(input>third){
				third = input;
			}
		}
		System.out.println(top);
		System.out.println(second);
		System.out.println(third);
    }
} Main public static void main(String[] a){
		Scanner in = new Scanner(System.in);
		int top, second, third, input;
		top = -1;
		second = -2;
		third = -3;
		for(int i=0; i<10; i++){
			input = in.nextInt();
			if(input>top){
				third = second;
				second = top;
				top = input;
			}else if(input>second){
				third = second;
				second = input;
			}else if(input>third){
				third = input;
			}
		}
		System.out.println(top);
		System.out.println(second);
		System.out.println(third);
    } main {
		Scanner in = new Scanner(System.in);
		int top, second, third, input;
		top = -1;
		second = -2;
		third = -3;
		for(int i=0; i<10; i++){
			input = in.nextInt();
			if(input>top){
				third = second;
				second = top;
				top = input;
			}else if(input>second){
				third = second;
				second = input;
			}else if(input>third){
				third = input;
			}
		}
		System.out.println(top);
		System.out.println(second);
		System.out.println(third);
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) int top top second second third third input; input top = -1 top -1 1 second = -2 second -2 2 third = -3 third -3 3 for(int i=0; i<10; i++){
			input = in.nextInt();
			if(input>top){
				third = second;
				second = top;
				top = input;
			}else if(input>second){
				third = second;
				second = input;
			}else if(input>third){
				third = input;
			}
		} int i=0; int i=0; i 0 i<10 i 10 i++ i++ i {
			input = in.nextInt();
			if(input>top){
				third = second;
				second = top;
				top = input;
			}else if(input>second){
				third = second;
				second = input;
			}else if(input>third){
				third = input;
			}
		} {
			input = in.nextInt();
			if(input>top){
				third = second;
				second = top;
				top = input;
			}else if(input>second){
				third = second;
				second = input;
			}else if(input>third){
				third = input;
			}
		} input = in.nextInt() input in.nextInt() in.nextInt in if(input>top){
				third = second;
				second = top;
				top = input;
			}else if(input>second){
				third = second;
				second = input;
			}else if(input>third){
				third = input;
			} input>top input top {
				third = second;
				second = top;
				top = input;
			} third = second third second second = top second top top = input top input if(input>second){
				third = second;
				second = input;
			}else if(input>third){
				third = input;
			} input>second input second {
				third = second;
				second = input;
			} third = second third second second = input second input if(input>third){
				third = input;
			} input>third input third {
				third = input;
			} third = input third input System.out.println(top) System.out.println System.out System System.out top System.out.println(second) System.out.println System.out System System.out second System.out.println(third) System.out.println System.out System System.out third String[] a a
import java.util.Scanner;
class Main{
    public static void main(String[] a){
		Scanner in = new Scanner(System.in);
		int top, second, third, input;
		top = -1;
		second = -2;
		third = -3;
		for(int i=0; i<10; i++){
			input = in.nextInt();
			if(input>top){
				third = second;
				second = top;
				top = input;
			}else if(input>second){
				third = second;
				second = input;
			}else if(input>third){
				third = input;
			}
		}
		System.out.println(top);
		System.out.println(second);
		System.out.println(third);
    }
}