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);
	}
	
} import java.io.*; io.* java 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);
	}
	
} Main static int first = 0; first 0 static int second = 0; second 0 static int third = 0; third 0 static int tmp = 0; 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);
	} main {
         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);
	} InputStreamReader isr = new InputStreamReader(System.in); isr new InputStreamReader(System.in) BufferedReader br = new BufferedReader(isr); 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){
        	
         } catch(Exception e){
        	
         } Exception e {
        	
         } {
        	 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();
        	 }    	 
         } String buf = br.readLine(); buf br.readLine() br.readLine br 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();
        	 } int i = 0; int i = 0; i 0 i <= 9 i 9 i++ i++ 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();
        	 } {
               	 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();
        	 } tmp = Integer.parseInt(buf) tmp Integer.parseInt(buf) Integer.parseInt Integer buf if(first <= tmp){
        	 		 third = second;
        	 		 second = first;
        	 		 first = tmp;
        	 	 }else if(second <= tmp){
        	 		 third = second;
        	 		 second = tmp;
        	 	 }else if(third <= tmp){
        	 		 third = tmp;
        	 	 } first <= tmp first tmp {
        	 		 third = second;
        	 		 second = first;
        	 		 first = tmp;
        	 	 } third = second third second second = first second first first = tmp first tmp if(second <= tmp){
        	 		 third = second;
        	 		 second = tmp;
        	 	 }else if(third <= tmp){
        	 		 third = tmp;
        	 	 } second <= tmp second tmp {
        	 		 third = second;
        	 		 second = tmp;
        	 	 } third = second third second second = tmp second tmp if(third <= tmp){
        	 		 third = tmp;
        	 	 } third <= tmp third tmp {
        	 		 third = tmp;
        	 	 } third = tmp third tmp buf = br.readLine() buf br.readLine() br.readLine br System.out.println(first+"\n"+second+"\n"+third) System.out.println System.out System System.out first+"\n"+second+"\n"+third "\n" second first+"\n"+second+"\n"+third first "\n" second "\n" third String[] args args 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);
	}
	
} 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);
	}
	
} Main
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);
	}
	
}