import java.io.*;

public class Main{

	static int first = 0;
	static int second = 0;
	static int third = 0;
	static int tmp = 0;
	
	public static void main(String[] args) {
         InputStreamReader isr = new InputStreamReader(System.in);
         BufferedReader br = new BufferedReader(isr);
         try{
        	 String buf = br.readLine();
        	 for(int i = 0; i <= 9; i++){
               	 tmp = Integer.parseInt(buf);
        	 	 if(first <= tmp){
        	 		 third = second;
        	 		 second = first;
        	 		 first = tmp;
        	 	 }else if(second <= tmp){
        	 		 third = second;
        	 		 second = tmp;
        	 	 }else if(third <= tmp){
        	 		 third = tmp;
        	 	 }
        	 	 buf = br.readLine();
        	 }    	 
         }catch(Exception e){
        	
         }        
         System.out.println(first+"\n"+second+"\n"+third);
	}
	
}
/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz