import java.io.*;

public class Main {
	public static void main(String[] a) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int[] Hills = new int[10];
		for (int i = 0; i < Hills.length; i++) {
			Hills[i] = Integer.parseInt(br.readLine());
		}
		int no1=0;
		int no2=0;
		int no3=0;
		
		for(int buf:Hills){
			if(no1<buf){
				no3=no2;
				no2=no1;
				no1=buf;
			}
			else if(no2<buf){
				no3=no2;
				no2=buf;
			}
			else if(no3<buf){
				no3 = buf;
			}
		}
		
		System.out.println(no1+"\n"+no2+"\n"+no3);

	}
} import java.io.*; io.* java public class Main {
	public static void main(String[] a) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int[] Hills = new int[10];
		for (int i = 0; i < Hills.length; i++) {
			Hills[i] = Integer.parseInt(br.readLine());
		}
		int no1=0;
		int no2=0;
		int no3=0;
		
		for(int buf:Hills){
			if(no1<buf){
				no3=no2;
				no2=no1;
				no1=buf;
			}
			else if(no2<buf){
				no3=no2;
				no2=buf;
			}
			else if(no3<buf){
				no3 = buf;
			}
		}
		
		System.out.println(no1+"\n"+no2+"\n"+no3);

	}
} Main public static void main(String[] a) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int[] Hills = new int[10];
		for (int i = 0; i < Hills.length; i++) {
			Hills[i] = Integer.parseInt(br.readLine());
		}
		int no1=0;
		int no2=0;
		int no3=0;
		
		for(int buf:Hills){
			if(no1<buf){
				no3=no2;
				no2=no1;
				no1=buf;
			}
			else if(no2<buf){
				no3=no2;
				no2=buf;
			}
			else if(no3<buf){
				no3 = buf;
			}
		}
		
		System.out.println(no1+"\n"+no2+"\n"+no3);

	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int[] Hills = new int[10];
		for (int i = 0; i < Hills.length; i++) {
			Hills[i] = Integer.parseInt(br.readLine());
		}
		int no1=0;
		int no2=0;
		int no3=0;
		
		for(int buf:Hills){
			if(no1<buf){
				no3=no2;
				no2=no1;
				no1=buf;
			}
			else if(no2<buf){
				no3=no2;
				no2=buf;
			}
			else if(no3<buf){
				no3 = buf;
			}
		}
		
		System.out.println(no1+"\n"+no2+"\n"+no3);

	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int[] Hills = new int[10]; Hills new int[10] 10 for (int i = 0; i < Hills.length; i++) {
			Hills[i] = Integer.parseInt(br.readLine());
		} int i = 0; int i = 0; i 0 i < Hills.length i Hills.length Hills Hills.length i++ i++ i {
			Hills[i] = Integer.parseInt(br.readLine());
		} {
			Hills[i] = Integer.parseInt(br.readLine());
		} Hills[i] = Integer.parseInt(br.readLine()) Hills[i] Hills i Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br int no1=0; no1 0 int no2=0; no2 0 int no3=0; no3 0 for(int buf:Hills){
			if(no1<buf){
				no3=no2;
				no2=no1;
				no1=buf;
			}
			else if(no2<buf){
				no3=no2;
				no2=buf;
			}
			else if(no3<buf){
				no3 = buf;
			}
		} int buf Hills {
			if(no1<buf){
				no3=no2;
				no2=no1;
				no1=buf;
			}
			else if(no2<buf){
				no3=no2;
				no2=buf;
			}
			else if(no3<buf){
				no3 = buf;
			}
		} {
			if(no1<buf){
				no3=no2;
				no2=no1;
				no1=buf;
			}
			else if(no2<buf){
				no3=no2;
				no2=buf;
			}
			else if(no3<buf){
				no3 = buf;
			}
		} if(no1<buf){
				no3=no2;
				no2=no1;
				no1=buf;
			}
			else if(no2<buf){
				no3=no2;
				no2=buf;
			}
			else if(no3<buf){
				no3 = buf;
			} no1<buf no1 buf {
				no3=no2;
				no2=no1;
				no1=buf;
			} no3=no2 no3 no2 no2=no1 no2 no1 no1=buf no1 buf if(no2<buf){
				no3=no2;
				no2=buf;
			}
			else if(no3<buf){
				no3 = buf;
			} no2<buf no2 buf {
				no3=no2;
				no2=buf;
			} no3=no2 no3 no2 no2=buf no2 buf if(no3<buf){
				no3 = buf;
			} no3<buf no3 buf {
				no3 = buf;
			} no3 = buf no3 buf System.out.println(no1+"\n"+no2+"\n"+no3) System.out.println System.out System System.out no1+"\n"+no2+"\n"+no3 "\n" no2 no1+"\n"+no2+"\n"+no3 no1 "\n" no2 "\n" no3 String[] a a public class Main {
	public static void main(String[] a) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int[] Hills = new int[10];
		for (int i = 0; i < Hills.length; i++) {
			Hills[i] = Integer.parseInt(br.readLine());
		}
		int no1=0;
		int no2=0;
		int no3=0;
		
		for(int buf:Hills){
			if(no1<buf){
				no3=no2;
				no2=no1;
				no1=buf;
			}
			else if(no2<buf){
				no3=no2;
				no2=buf;
			}
			else if(no3<buf){
				no3 = buf;
			}
		}
		
		System.out.println(no1+"\n"+no2+"\n"+no3);

	}
} public class Main {
	public static void main(String[] a) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int[] Hills = new int[10];
		for (int i = 0; i < Hills.length; i++) {
			Hills[i] = Integer.parseInt(br.readLine());
		}
		int no1=0;
		int no2=0;
		int no3=0;
		
		for(int buf:Hills){
			if(no1<buf){
				no3=no2;
				no2=no1;
				no1=buf;
			}
			else if(no2<buf){
				no3=no2;
				no2=buf;
			}
			else if(no3<buf){
				no3 = buf;
			}
		}
		
		System.out.println(no1+"\n"+no2+"\n"+no3);

	}
} Main
import java.io.*;

public class Main {
	public static void main(String[] a) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int[] Hills = new int[10];
		for (int i = 0; i < Hills.length; i++) {
			Hills[i] = Integer.parseInt(br.readLine());
		}
		int no1=0;
		int no2=0;
		int no3=0;
		
		for(int buf:Hills){
			if(no1<buf){
				no3=no2;
				no2=no1;
				no1=buf;
			}
			else if(no2<buf){
				no3=no2;
				no2=buf;
			}
			else if(no3<buf){
				no3 = buf;
			}
		}
		
		System.out.println(no1+"\n"+no2+"\n"+no3);

	}
}