//List of Top 3 Hills
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

class Main{
	
	public static void main(String[] args) throws IOException {
		
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

//		 int n = Integer.parseInt(in.readLine());
		
		
		int top=0;
		int second=0;
		int third=0;
		
		int n;
		for(int i=0;i<10;i++){
			
			n = Integer.parseInt(in.readLine());
			
			if(n>third){
				third=n;
			
				if(n>second){
					third=second;
					second=n;
					
					if(n>top){
						second=top;
						top=n;
					}
				}
			}

			
		}
		
		
		System.out.println(top);
		System.out.println(second);
		System.out.println(third);
		
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io class Main{
	
	public static void main(String[] args) throws IOException {
		
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

//		 int n = Integer.parseInt(in.readLine());
		
		
		int top=0;
		int second=0;
		int third=0;
		
		int n;
		for(int i=0;i<10;i++){
			
			n = Integer.parseInt(in.readLine());
			
			if(n>third){
				third=n;
			
				if(n>second){
					third=second;
					second=n;
					
					if(n>top){
						second=top;
						top=n;
					}
				}
			}

			
		}
		
		
		System.out.println(top);
		System.out.println(second);
		System.out.println(third);
		
	}
} Main public static void main(String[] args) throws IOException {
		
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

//		 int n = Integer.parseInt(in.readLine());
		
		
		int top=0;
		int second=0;
		int third=0;
		
		int n;
		for(int i=0;i<10;i++){
			
			n = Integer.parseInt(in.readLine());
			
			if(n>third){
				third=n;
			
				if(n>second){
					third=second;
					second=n;
					
					if(n>top){
						second=top;
						top=n;
					}
				}
			}

			
		}
		
		
		System.out.println(top);
		System.out.println(second);
		System.out.println(third);
		
	} main {
		
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

//		 int n = Integer.parseInt(in.readLine());
		
		
		int top=0;
		int second=0;
		int third=0;
		
		int n;
		for(int i=0;i<10;i++){
			
			n = Integer.parseInt(in.readLine());
			
			if(n>third){
				third=n;
			
				if(n>second){
					third=second;
					second=n;
					
					if(n>top){
						second=top;
						top=n;
					}
				}
			}

			
		}
		
		
		System.out.println(top);
		System.out.println(second);
		System.out.println(third);
		
	} BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) int top=0; top 0 int second=0; second 0 int third=0; third 0 int n; n for(int i=0;i<10;i++){
			
			n = Integer.parseInt(in.readLine());
			
			if(n>third){
				third=n;
			
				if(n>second){
					third=second;
					second=n;
					
					if(n>top){
						second=top;
						top=n;
					}
				}
			}

			
		} int i=0; int i=0; i 0 i<10 i 10 i++ i++ i {
			
			n = Integer.parseInt(in.readLine());
			
			if(n>third){
				third=n;
			
				if(n>second){
					third=second;
					second=n;
					
					if(n>top){
						second=top;
						top=n;
					}
				}
			}

			
		} {
			
			n = Integer.parseInt(in.readLine());
			
			if(n>third){
				third=n;
			
				if(n>second){
					third=second;
					second=n;
					
					if(n>top){
						second=top;
						top=n;
					}
				}
			}

			
		} n = Integer.parseInt(in.readLine()) n Integer.parseInt(in.readLine()) Integer.parseInt Integer in.readLine() in.readLine in if(n>third){
				third=n;
			
				if(n>second){
					third=second;
					second=n;
					
					if(n>top){
						second=top;
						top=n;
					}
				}
			} n>third n third {
				third=n;
			
				if(n>second){
					third=second;
					second=n;
					
					if(n>top){
						second=top;
						top=n;
					}
				}
			} third=n third n if(n>second){
					third=second;
					second=n;
					
					if(n>top){
						second=top;
						top=n;
					}
				} n>second n second {
					third=second;
					second=n;
					
					if(n>top){
						second=top;
						top=n;
					}
				} third=second third second second=n second n if(n>top){
						second=top;
						top=n;
					} n>top n top {
						second=top;
						top=n;
					} second=top second top top=n top n 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[] args args
//List of Top 3 Hills
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

class Main{
	
	public static void main(String[] args) throws IOException {
		
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

//		 int n = Integer.parseInt(in.readLine());
		
		
		int top=0;
		int second=0;
		int third=0;
		
		int n;
		for(int i=0;i<10;i++){
			
			n = Integer.parseInt(in.readLine());
			
			if(n>third){
				third=n;
			
				if(n>second){
					third=second;
					second=n;
					
					if(n>top){
						second=top;
						top=n;
					}
				}
			}

			
		}
		
		
		System.out.println(top);
		System.out.println(second);
		System.out.println(third);
		
	}
}