import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int max1 = 0;
		int max2 = 0;
		int max3 = 0;
		int tmp;
		
		for(int i = 0;i<10;i++){
			tmp = scan.nextInt();
			
			if(tmp>max1){
				max3=max2;
				max2=max1;
				max1=tmp;
			}else if(tmp>max2){
				max3=max2;
				max2=tmp;
			}else if(tmp>max3){
				max3=tmp;
			}
		}
		
		System.out.println(max1);
		System.out.println(max2);
		System.out.println(max3);
	    
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int max1 = 0;
		int max2 = 0;
		int max3 = 0;
		int tmp;
		
		for(int i = 0;i<10;i++){
			tmp = scan.nextInt();
			
			if(tmp>max1){
				max3=max2;
				max2=max1;
				max1=tmp;
			}else if(tmp>max2){
				max3=max2;
				max2=tmp;
			}else if(tmp>max3){
				max3=tmp;
			}
		}
		
		System.out.println(max1);
		System.out.println(max2);
		System.out.println(max3);
	    
	}
} Main public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int max1 = 0;
		int max2 = 0;
		int max3 = 0;
		int tmp;
		
		for(int i = 0;i<10;i++){
			tmp = scan.nextInt();
			
			if(tmp>max1){
				max3=max2;
				max2=max1;
				max1=tmp;
			}else if(tmp>max2){
				max3=max2;
				max2=tmp;
			}else if(tmp>max3){
				max3=tmp;
			}
		}
		
		System.out.println(max1);
		System.out.println(max2);
		System.out.println(max3);
	    
	} main {
		Scanner scan = new Scanner(System.in);
		int max1 = 0;
		int max2 = 0;
		int max3 = 0;
		int tmp;
		
		for(int i = 0;i<10;i++){
			tmp = scan.nextInt();
			
			if(tmp>max1){
				max3=max2;
				max2=max1;
				max1=tmp;
			}else if(tmp>max2){
				max3=max2;
				max2=tmp;
			}else if(tmp>max3){
				max3=tmp;
			}
		}
		
		System.out.println(max1);
		System.out.println(max2);
		System.out.println(max3);
	    
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int max1 = 0; max1 0 int max2 = 0; max2 0 int max3 = 0; max3 0 int tmp; tmp for(int i = 0;i<10;i++){
			tmp = scan.nextInt();
			
			if(tmp>max1){
				max3=max2;
				max2=max1;
				max1=tmp;
			}else if(tmp>max2){
				max3=max2;
				max2=tmp;
			}else if(tmp>max3){
				max3=tmp;
			}
		} int i = 0; int i = 0; i 0 i<10 i 10 i++ i++ i {
			tmp = scan.nextInt();
			
			if(tmp>max1){
				max3=max2;
				max2=max1;
				max1=tmp;
			}else if(tmp>max2){
				max3=max2;
				max2=tmp;
			}else if(tmp>max3){
				max3=tmp;
			}
		} {
			tmp = scan.nextInt();
			
			if(tmp>max1){
				max3=max2;
				max2=max1;
				max1=tmp;
			}else if(tmp>max2){
				max3=max2;
				max2=tmp;
			}else if(tmp>max3){
				max3=tmp;
			}
		} tmp = scan.nextInt() tmp scan.nextInt() scan.nextInt scan if(tmp>max1){
				max3=max2;
				max2=max1;
				max1=tmp;
			}else if(tmp>max2){
				max3=max2;
				max2=tmp;
			}else if(tmp>max3){
				max3=tmp;
			} tmp>max1 tmp max1 {
				max3=max2;
				max2=max1;
				max1=tmp;
			} max3=max2 max3 max2 max2=max1 max2 max1 max1=tmp max1 tmp if(tmp>max2){
				max3=max2;
				max2=tmp;
			}else if(tmp>max3){
				max3=tmp;
			} tmp>max2 tmp max2 {
				max3=max2;
				max2=tmp;
			} max3=max2 max3 max2 max2=tmp max2 tmp if(tmp>max3){
				max3=tmp;
			} tmp>max3 tmp max3 {
				max3=tmp;
			} max3=tmp max3 tmp System.out.println(max1) System.out.println System.out System System.out max1 System.out.println(max2) System.out.println System.out System System.out max2 System.out.println(max3) System.out.println System.out System System.out max3 String[] args args public class Main {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int max1 = 0;
		int max2 = 0;
		int max3 = 0;
		int tmp;
		
		for(int i = 0;i<10;i++){
			tmp = scan.nextInt();
			
			if(tmp>max1){
				max3=max2;
				max2=max1;
				max1=tmp;
			}else if(tmp>max2){
				max3=max2;
				max2=tmp;
			}else if(tmp>max3){
				max3=tmp;
			}
		}
		
		System.out.println(max1);
		System.out.println(max2);
		System.out.println(max3);
	    
	}
} public class Main {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int max1 = 0;
		int max2 = 0;
		int max3 = 0;
		int tmp;
		
		for(int i = 0;i<10;i++){
			tmp = scan.nextInt();
			
			if(tmp>max1){
				max3=max2;
				max2=max1;
				max1=tmp;
			}else if(tmp>max2){
				max3=max2;
				max2=tmp;
			}else if(tmp>max3){
				max3=tmp;
			}
		}
		
		System.out.println(max1);
		System.out.println(max2);
		System.out.println(max3);
	    
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int max1 = 0;
		int max2 = 0;
		int max3 = 0;
		int tmp;
		
		for(int i = 0;i<10;i++){
			tmp = scan.nextInt();
			
			if(tmp>max1){
				max3=max2;
				max2=max1;
				max1=tmp;
			}else if(tmp>max2){
				max3=max2;
				max2=tmp;
			}else if(tmp>max3){
				max3=tmp;
			}
		}
		
		System.out.println(max1);
		System.out.println(max2);
		System.out.println(max3);
	    
	}
}