import java.util.Scanner;


public class Main {
	public static void main(String[] args){
		Scanner s = new Scanner(System.in);
		int[] heights = new int[10];
		int hi = 0;
		int me = 0;
		int low = 0;
		for(int i = 0; i < heights.length; i++){
			int height = s.nextInt();
			if(height >= hi){
				low = me;
				me = hi;
				hi = height;
			}
			if(height >= me && height < hi){
				low = me;
				me = height;
			}
			if(height >= low && height < me){
				low = height;
			}
		}
		System.out.println(hi);
		System.out.println(me);
		System.out.println(low);
		
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args){
		Scanner s = new Scanner(System.in);
		int[] heights = new int[10];
		int hi = 0;
		int me = 0;
		int low = 0;
		for(int i = 0; i < heights.length; i++){
			int height = s.nextInt();
			if(height >= hi){
				low = me;
				me = hi;
				hi = height;
			}
			if(height >= me && height < hi){
				low = me;
				me = height;
			}
			if(height >= low && height < me){
				low = height;
			}
		}
		System.out.println(hi);
		System.out.println(me);
		System.out.println(low);
		
	}
} Main public static void main(String[] args){
		Scanner s = new Scanner(System.in);
		int[] heights = new int[10];
		int hi = 0;
		int me = 0;
		int low = 0;
		for(int i = 0; i < heights.length; i++){
			int height = s.nextInt();
			if(height >= hi){
				low = me;
				me = hi;
				hi = height;
			}
			if(height >= me && height < hi){
				low = me;
				me = height;
			}
			if(height >= low && height < me){
				low = height;
			}
		}
		System.out.println(hi);
		System.out.println(me);
		System.out.println(low);
		
	} main {
		Scanner s = new Scanner(System.in);
		int[] heights = new int[10];
		int hi = 0;
		int me = 0;
		int low = 0;
		for(int i = 0; i < heights.length; i++){
			int height = s.nextInt();
			if(height >= hi){
				low = me;
				me = hi;
				hi = height;
			}
			if(height >= me && height < hi){
				low = me;
				me = height;
			}
			if(height >= low && height < me){
				low = height;
			}
		}
		System.out.println(hi);
		System.out.println(me);
		System.out.println(low);
		
	} Scanner s = new Scanner(System.in); s new Scanner(System.in) int[] heights = new int[10]; heights new int[10] 10 int hi = 0; hi 0 int me = 0; me 0 int low = 0; low 0 for(int i = 0; i < heights.length; i++){
			int height = s.nextInt();
			if(height >= hi){
				low = me;
				me = hi;
				hi = height;
			}
			if(height >= me && height < hi){
				low = me;
				me = height;
			}
			if(height >= low && height < me){
				low = height;
			}
		} int i = 0; int i = 0; i 0 i < heights.length i heights.length heights heights.length i++ i++ i {
			int height = s.nextInt();
			if(height >= hi){
				low = me;
				me = hi;
				hi = height;
			}
			if(height >= me && height < hi){
				low = me;
				me = height;
			}
			if(height >= low && height < me){
				low = height;
			}
		} {
			int height = s.nextInt();
			if(height >= hi){
				low = me;
				me = hi;
				hi = height;
			}
			if(height >= me && height < hi){
				low = me;
				me = height;
			}
			if(height >= low && height < me){
				low = height;
			}
		} int height = s.nextInt(); height s.nextInt() s.nextInt s if(height >= hi){
				low = me;
				me = hi;
				hi = height;
			} height >= hi height hi {
				low = me;
				me = hi;
				hi = height;
			} low = me low me me = hi me hi hi = height hi height if(height >= me && height < hi){
				low = me;
				me = height;
			} height >= me && height < hi height >= me height me height < hi height hi {
				low = me;
				me = height;
			} low = me low me me = height me height if(height >= low && height < me){
				low = height;
			} height >= low && height < me height >= low height low height < me height me {
				low = height;
			} low = height low height System.out.println(hi) System.out.println System.out System System.out hi System.out.println(me) System.out.println System.out System System.out me System.out.println(low) System.out.println System.out System System.out low String[] args args public class Main {
	public static void main(String[] args){
		Scanner s = new Scanner(System.in);
		int[] heights = new int[10];
		int hi = 0;
		int me = 0;
		int low = 0;
		for(int i = 0; i < heights.length; i++){
			int height = s.nextInt();
			if(height >= hi){
				low = me;
				me = hi;
				hi = height;
			}
			if(height >= me && height < hi){
				low = me;
				me = height;
			}
			if(height >= low && height < me){
				low = height;
			}
		}
		System.out.println(hi);
		System.out.println(me);
		System.out.println(low);
		
	}
} public class Main {
	public static void main(String[] args){
		Scanner s = new Scanner(System.in);
		int[] heights = new int[10];
		int hi = 0;
		int me = 0;
		int low = 0;
		for(int i = 0; i < heights.length; i++){
			int height = s.nextInt();
			if(height >= hi){
				low = me;
				me = hi;
				hi = height;
			}
			if(height >= me && height < hi){
				low = me;
				me = height;
			}
			if(height >= low && height < me){
				low = height;
			}
		}
		System.out.println(hi);
		System.out.println(me);
		System.out.println(low);
		
	}
} Main
import java.util.Scanner;


public class Main {
	public static void main(String[] args){
		Scanner s = new Scanner(System.in);
		int[] heights = new int[10];
		int hi = 0;
		int me = 0;
		int low = 0;
		for(int i = 0; i < heights.length; i++){
			int height = s.nextInt();
			if(height >= hi){
				low = me;
				me = hi;
				hi = height;
			}
			if(height >= me && height < hi){
				low = me;
				me = height;
			}
			if(height >= low && height < me){
				low = height;
			}
		}
		System.out.println(hi);
		System.out.println(me);
		System.out.println(low);
		
	}
}