import java.util.Scanner;

class Main{
	public static void main(String[] a){
		Scanner scanner = new Scanner(System.in);
		int first = 0 ,second = 0 , third = 0;
		int[] hills = new int[10];
		for(int i = 0 ; i < 10 ; i ++ ){
			hills[i] = scanner.nextInt();
			if(hills[i]>first){
				third = second;
				second = first;
				first=hills[i];
			}
			else if(hills[i]>second){
				third = second;
				second=hills[i];
				}
			else if(hills[i]>third){
				third=hills[i];
				}
		}
		System.out.print(first+"\n"+second+"\n"+third+"\n");
		
    	}
} import java.util.Scanner; Scanner java.util class Main{
	public static void main(String[] a){
		Scanner scanner = new Scanner(System.in);
		int first = 0 ,second = 0 , third = 0;
		int[] hills = new int[10];
		for(int i = 0 ; i < 10 ; i ++ ){
			hills[i] = scanner.nextInt();
			if(hills[i]>first){
				third = second;
				second = first;
				first=hills[i];
			}
			else if(hills[i]>second){
				third = second;
				second=hills[i];
				}
			else if(hills[i]>third){
				third=hills[i];
				}
		}
		System.out.print(first+"\n"+second+"\n"+third+"\n");
		
    	}
} Main public static void main(String[] a){
		Scanner scanner = new Scanner(System.in);
		int first = 0 ,second = 0 , third = 0;
		int[] hills = new int[10];
		for(int i = 0 ; i < 10 ; i ++ ){
			hills[i] = scanner.nextInt();
			if(hills[i]>first){
				third = second;
				second = first;
				first=hills[i];
			}
			else if(hills[i]>second){
				third = second;
				second=hills[i];
				}
			else if(hills[i]>third){
				third=hills[i];
				}
		}
		System.out.print(first+"\n"+second+"\n"+third+"\n");
		
    	} main {
		Scanner scanner = new Scanner(System.in);
		int first = 0 ,second = 0 , third = 0;
		int[] hills = new int[10];
		for(int i = 0 ; i < 10 ; i ++ ){
			hills[i] = scanner.nextInt();
			if(hills[i]>first){
				third = second;
				second = first;
				first=hills[i];
			}
			else if(hills[i]>second){
				third = second;
				second=hills[i];
				}
			else if(hills[i]>third){
				third=hills[i];
				}
		}
		System.out.print(first+"\n"+second+"\n"+third+"\n");
		
    	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int first = 0 first 0 second = 0 second 0 third = 0; third 0 int[] hills = new int[10]; hills new int[10] 10 for(int i = 0 ; i < 10 ; i ++ ){
			hills[i] = scanner.nextInt();
			if(hills[i]>first){
				third = second;
				second = first;
				first=hills[i];
			}
			else if(hills[i]>second){
				third = second;
				second=hills[i];
				}
			else if(hills[i]>third){
				third=hills[i];
				}
		} int i = 0 ; int i = 0 ; i 0 i < 10 i 10 i ++ i ++ i {
			hills[i] = scanner.nextInt();
			if(hills[i]>first){
				third = second;
				second = first;
				first=hills[i];
			}
			else if(hills[i]>second){
				third = second;
				second=hills[i];
				}
			else if(hills[i]>third){
				third=hills[i];
				}
		} {
			hills[i] = scanner.nextInt();
			if(hills[i]>first){
				third = second;
				second = first;
				first=hills[i];
			}
			else if(hills[i]>second){
				third = second;
				second=hills[i];
				}
			else if(hills[i]>third){
				third=hills[i];
				}
		} hills[i] = scanner.nextInt() hills[i] hills i scanner.nextInt() scanner.nextInt scanner if(hills[i]>first){
				third = second;
				second = first;
				first=hills[i];
			}
			else if(hills[i]>second){
				third = second;
				second=hills[i];
				}
			else if(hills[i]>third){
				third=hills[i];
				} hills[i]>first hills[i] hills i first {
				third = second;
				second = first;
				first=hills[i];
			} third = second third second second = first second first first=hills[i] first hills[i] hills i if(hills[i]>second){
				third = second;
				second=hills[i];
				}
			else if(hills[i]>third){
				third=hills[i];
				} hills[i]>second hills[i] hills i second {
				third = second;
				second=hills[i];
				} third = second third second second=hills[i] second hills[i] hills i if(hills[i]>third){
				third=hills[i];
				} hills[i]>third hills[i] hills i third {
				third=hills[i];
				} third=hills[i] third hills[i] hills i System.out.print(first+"\n"+second+"\n"+third+"\n") System.out.print System.out System System.out first+"\n"+second+"\n"+third+"\n" third "\n" second first+"\n"+second+"\n"+third+"\n" first "\n" second "\n" third "\n" String[] a a
import java.util.Scanner;

class Main{
	public static void main(String[] a){
		Scanner scanner = new Scanner(System.in);
		int first = 0 ,second = 0 , third = 0;
		int[] hills = new int[10];
		for(int i = 0 ; i < 10 ; i ++ ){
			hills[i] = scanner.nextInt();
			if(hills[i]>first){
				third = second;
				second = first;
				first=hills[i];
			}
			else if(hills[i]>second){
				third = second;
				second=hills[i];
				}
			else if(hills[i]>third){
				third=hills[i];
				}
		}
		System.out.print(first+"\n"+second+"\n"+third+"\n");
		
    	}
}