import java.util.Scanner;

public class Main {
	public static void main(String[] a){
		
		Scanner sc = new Scanner(System.in);
		int mx1 = 0, mx2 = 0, mx3 = 0;
		
		for(int i = 0; i < 10; i ++){
			int mtHeight = sc.nextInt();
			if(mx1 < mtHeight){
				mx3 = mx2;
				mx2 = mx1;
				mx1 = mtHeight;
			}else if(mx2 < mtHeight){
				mx3 = mx2;
				mx2 = mtHeight;
			}else if(mx3 < mtHeight){
				mx3 = mtHeight;
			}
			
			}
		System.out.printf("%d\n%d\n%d\n", mx1, mx2, mx3);
	}
}
	 import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] a){
		
		Scanner sc = new Scanner(System.in);
		int mx1 = 0, mx2 = 0, mx3 = 0;
		
		for(int i = 0; i < 10; i ++){
			int mtHeight = sc.nextInt();
			if(mx1 < mtHeight){
				mx3 = mx2;
				mx2 = mx1;
				mx1 = mtHeight;
			}else if(mx2 < mtHeight){
				mx3 = mx2;
				mx2 = mtHeight;
			}else if(mx3 < mtHeight){
				mx3 = mtHeight;
			}
			
			}
		System.out.printf("%d\n%d\n%d\n", mx1, mx2, mx3);
	}
} Main public static void main(String[] a){
		
		Scanner sc = new Scanner(System.in);
		int mx1 = 0, mx2 = 0, mx3 = 0;
		
		for(int i = 0; i < 10; i ++){
			int mtHeight = sc.nextInt();
			if(mx1 < mtHeight){
				mx3 = mx2;
				mx2 = mx1;
				mx1 = mtHeight;
			}else if(mx2 < mtHeight){
				mx3 = mx2;
				mx2 = mtHeight;
			}else if(mx3 < mtHeight){
				mx3 = mtHeight;
			}
			
			}
		System.out.printf("%d\n%d\n%d\n", mx1, mx2, mx3);
	} main {
		
		Scanner sc = new Scanner(System.in);
		int mx1 = 0, mx2 = 0, mx3 = 0;
		
		for(int i = 0; i < 10; i ++){
			int mtHeight = sc.nextInt();
			if(mx1 < mtHeight){
				mx3 = mx2;
				mx2 = mx1;
				mx1 = mtHeight;
			}else if(mx2 < mtHeight){
				mx3 = mx2;
				mx2 = mtHeight;
			}else if(mx3 < mtHeight){
				mx3 = mtHeight;
			}
			
			}
		System.out.printf("%d\n%d\n%d\n", mx1, mx2, mx3);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int mx1 = 0 mx1 0 mx2 = 0 mx2 0 mx3 = 0; mx3 0 for(int i = 0; i < 10; i ++){
			int mtHeight = sc.nextInt();
			if(mx1 < mtHeight){
				mx3 = mx2;
				mx2 = mx1;
				mx1 = mtHeight;
			}else if(mx2 < mtHeight){
				mx3 = mx2;
				mx2 = mtHeight;
			}else if(mx3 < mtHeight){
				mx3 = mtHeight;
			}
			
			} int i = 0; int i = 0; i 0 i < 10 i 10 i ++ i ++ i {
			int mtHeight = sc.nextInt();
			if(mx1 < mtHeight){
				mx3 = mx2;
				mx2 = mx1;
				mx1 = mtHeight;
			}else if(mx2 < mtHeight){
				mx3 = mx2;
				mx2 = mtHeight;
			}else if(mx3 < mtHeight){
				mx3 = mtHeight;
			}
			
			} {
			int mtHeight = sc.nextInt();
			if(mx1 < mtHeight){
				mx3 = mx2;
				mx2 = mx1;
				mx1 = mtHeight;
			}else if(mx2 < mtHeight){
				mx3 = mx2;
				mx2 = mtHeight;
			}else if(mx3 < mtHeight){
				mx3 = mtHeight;
			}
			
			} int mtHeight = sc.nextInt(); mtHeight sc.nextInt() sc.nextInt sc if(mx1 < mtHeight){
				mx3 = mx2;
				mx2 = mx1;
				mx1 = mtHeight;
			}else if(mx2 < mtHeight){
				mx3 = mx2;
				mx2 = mtHeight;
			}else if(mx3 < mtHeight){
				mx3 = mtHeight;
			} mx1 < mtHeight mx1 mtHeight {
				mx3 = mx2;
				mx2 = mx1;
				mx1 = mtHeight;
			} mx3 = mx2 mx3 mx2 mx2 = mx1 mx2 mx1 mx1 = mtHeight mx1 mtHeight if(mx2 < mtHeight){
				mx3 = mx2;
				mx2 = mtHeight;
			}else if(mx3 < mtHeight){
				mx3 = mtHeight;
			} mx2 < mtHeight mx2 mtHeight {
				mx3 = mx2;
				mx2 = mtHeight;
			} mx3 = mx2 mx3 mx2 mx2 = mtHeight mx2 mtHeight if(mx3 < mtHeight){
				mx3 = mtHeight;
			} mx3 < mtHeight mx3 mtHeight {
				mx3 = mtHeight;
			} mx3 = mtHeight mx3 mtHeight System.out.printf("%d\n%d\n%d\n", mx1, mx2, mx3) System.out.printf System.out System System.out "%d\n%d\n%d\n" mx1 mx2 mx3 String[] a a public class Main {
	public static void main(String[] a){
		
		Scanner sc = new Scanner(System.in);
		int mx1 = 0, mx2 = 0, mx3 = 0;
		
		for(int i = 0; i < 10; i ++){
			int mtHeight = sc.nextInt();
			if(mx1 < mtHeight){
				mx3 = mx2;
				mx2 = mx1;
				mx1 = mtHeight;
			}else if(mx2 < mtHeight){
				mx3 = mx2;
				mx2 = mtHeight;
			}else if(mx3 < mtHeight){
				mx3 = mtHeight;
			}
			
			}
		System.out.printf("%d\n%d\n%d\n", mx1, mx2, mx3);
	}
} public class Main {
	public static void main(String[] a){
		
		Scanner sc = new Scanner(System.in);
		int mx1 = 0, mx2 = 0, mx3 = 0;
		
		for(int i = 0; i < 10; i ++){
			int mtHeight = sc.nextInt();
			if(mx1 < mtHeight){
				mx3 = mx2;
				mx2 = mx1;
				mx1 = mtHeight;
			}else if(mx2 < mtHeight){
				mx3 = mx2;
				mx2 = mtHeight;
			}else if(mx3 < mtHeight){
				mx3 = mtHeight;
			}
			
			}
		System.out.printf("%d\n%d\n%d\n", mx1, mx2, mx3);
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] a){
		
		Scanner sc = new Scanner(System.in);
		int mx1 = 0, mx2 = 0, mx3 = 0;
		
		for(int i = 0; i < 10; i ++){
			int mtHeight = sc.nextInt();
			if(mx1 < mtHeight){
				mx3 = mx2;
				mx2 = mx1;
				mx1 = mtHeight;
			}else if(mx2 < mtHeight){
				mx3 = mx2;
				mx2 = mtHeight;
			}else if(mx3 < mtHeight){
				mx3 = mtHeight;
			}
			
			}
		System.out.printf("%d\n%d\n%d\n", mx1, mx2, mx3);
	}
}
	