import java.io.IOException;
import java.io.*;

public class Main {
	
	public static int[] source = new int[10];	
	static int b1 = 0;
	static int b2 = 0;
	static int b3 = 0;
	
	public static void main(String args[]) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		for (int i=0; i<10; i++){
			source[i] = Integer.parseInt(in.readLine());
		}
		sort();
		System.out.println(b1);
		System.out.println(b2);
		System.out.println(b3);
	}
		
	public static void sort(){
		for(int i=0; i<10; i++){
			if(b1 < source[i]){
				b3 = b2;
				b2 = b1;
				b1 = source[i];
			}else if(b2 < source[i]){
				b3 = b2;
				b2 = source[i];
			}else if(b3 < source[i]){
				b3 = source[i];
			}
		}
	}
	
} import java.io.IOException; IOException java.io import java.io.*; io.* java public class Main {
	
	public static int[] source = new int[10];	
	static int b1 = 0;
	static int b2 = 0;
	static int b3 = 0;
	
	public static void main(String args[]) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		for (int i=0; i<10; i++){
			source[i] = Integer.parseInt(in.readLine());
		}
		sort();
		System.out.println(b1);
		System.out.println(b2);
		System.out.println(b3);
	}
		
	public static void sort(){
		for(int i=0; i<10; i++){
			if(b1 < source[i]){
				b3 = b2;
				b2 = b1;
				b1 = source[i];
			}else if(b2 < source[i]){
				b3 = b2;
				b2 = source[i];
			}else if(b3 < source[i]){
				b3 = source[i];
			}
		}
	}
	
} Main public static int[] source = new int[10]; source new int[10] 10 static int b1 = 0; b1 0 static int b2 = 0; b2 0 static int b3 = 0; b3 0 public static void main(String args[]) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		for (int i=0; i<10; i++){
			source[i] = Integer.parseInt(in.readLine());
		}
		sort();
		System.out.println(b1);
		System.out.println(b2);
		System.out.println(b3);
	} main {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		for (int i=0; i<10; i++){
			source[i] = Integer.parseInt(in.readLine());
		}
		sort();
		System.out.println(b1);
		System.out.println(b2);
		System.out.println(b3);
	} BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) for (int i=0; i<10; i++){
			source[i] = Integer.parseInt(in.readLine());
		} int i=0; int i=0; i 0 i<10 i 10 i++ i++ i {
			source[i] = Integer.parseInt(in.readLine());
		} {
			source[i] = Integer.parseInt(in.readLine());
		} source[i] = Integer.parseInt(in.readLine()) source[i] source i Integer.parseInt(in.readLine()) Integer.parseInt Integer in.readLine() in.readLine in sort() sort System.out.println(b1) System.out.println System.out System System.out b1 System.out.println(b2) System.out.println System.out System System.out b2 System.out.println(b3) System.out.println System.out System System.out b3 String args[] args public static void sort(){
		for(int i=0; i<10; i++){
			if(b1 < source[i]){
				b3 = b2;
				b2 = b1;
				b1 = source[i];
			}else if(b2 < source[i]){
				b3 = b2;
				b2 = source[i];
			}else if(b3 < source[i]){
				b3 = source[i];
			}
		}
	} sort {
		for(int i=0; i<10; i++){
			if(b1 < source[i]){
				b3 = b2;
				b2 = b1;
				b1 = source[i];
			}else if(b2 < source[i]){
				b3 = b2;
				b2 = source[i];
			}else if(b3 < source[i]){
				b3 = source[i];
			}
		}
	} for(int i=0; i<10; i++){
			if(b1 < source[i]){
				b3 = b2;
				b2 = b1;
				b1 = source[i];
			}else if(b2 < source[i]){
				b3 = b2;
				b2 = source[i];
			}else if(b3 < source[i]){
				b3 = source[i];
			}
		} int i=0; int i=0; i 0 i<10 i 10 i++ i++ i {
			if(b1 < source[i]){
				b3 = b2;
				b2 = b1;
				b1 = source[i];
			}else if(b2 < source[i]){
				b3 = b2;
				b2 = source[i];
			}else if(b3 < source[i]){
				b3 = source[i];
			}
		} {
			if(b1 < source[i]){
				b3 = b2;
				b2 = b1;
				b1 = source[i];
			}else if(b2 < source[i]){
				b3 = b2;
				b2 = source[i];
			}else if(b3 < source[i]){
				b3 = source[i];
			}
		} if(b1 < source[i]){
				b3 = b2;
				b2 = b1;
				b1 = source[i];
			}else if(b2 < source[i]){
				b3 = b2;
				b2 = source[i];
			}else if(b3 < source[i]){
				b3 = source[i];
			} b1 < source[i] b1 source[i] source i {
				b3 = b2;
				b2 = b1;
				b1 = source[i];
			} b3 = b2 b3 b2 b2 = b1 b2 b1 b1 = source[i] b1 source[i] source i if(b2 < source[i]){
				b3 = b2;
				b2 = source[i];
			}else if(b3 < source[i]){
				b3 = source[i];
			} b2 < source[i] b2 source[i] source i {
				b3 = b2;
				b2 = source[i];
			} b3 = b2 b3 b2 b2 = source[i] b2 source[i] source i if(b3 < source[i]){
				b3 = source[i];
			} b3 < source[i] b3 source[i] source i {
				b3 = source[i];
			} b3 = source[i] b3 source[i] source i public class Main {
	
	public static int[] source = new int[10];	
	static int b1 = 0;
	static int b2 = 0;
	static int b3 = 0;
	
	public static void main(String args[]) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		for (int i=0; i<10; i++){
			source[i] = Integer.parseInt(in.readLine());
		}
		sort();
		System.out.println(b1);
		System.out.println(b2);
		System.out.println(b3);
	}
		
	public static void sort(){
		for(int i=0; i<10; i++){
			if(b1 < source[i]){
				b3 = b2;
				b2 = b1;
				b1 = source[i];
			}else if(b2 < source[i]){
				b3 = b2;
				b2 = source[i];
			}else if(b3 < source[i]){
				b3 = source[i];
			}
		}
	}
	
} public class Main {
	
	public static int[] source = new int[10];	
	static int b1 = 0;
	static int b2 = 0;
	static int b3 = 0;
	
	public static void main(String args[]) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		for (int i=0; i<10; i++){
			source[i] = Integer.parseInt(in.readLine());
		}
		sort();
		System.out.println(b1);
		System.out.println(b2);
		System.out.println(b3);
	}
		
	public static void sort(){
		for(int i=0; i<10; i++){
			if(b1 < source[i]){
				b3 = b2;
				b2 = b1;
				b1 = source[i];
			}else if(b2 < source[i]){
				b3 = b2;
				b2 = source[i];
			}else if(b3 < source[i]){
				b3 = source[i];
			}
		}
	}
	
} Main
import java.io.IOException;
import java.io.*;

public class Main {
	
	public static int[] source = new int[10];	
	static int b1 = 0;
	static int b2 = 0;
	static int b3 = 0;
	
	public static void main(String args[]) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		for (int i=0; i<10; i++){
			source[i] = Integer.parseInt(in.readLine());
		}
		sort();
		System.out.println(b1);
		System.out.println(b2);
		System.out.println(b3);
	}
		
	public static void sort(){
		for(int i=0; i<10; i++){
			if(b1 < source[i]){
				b3 = b2;
				b2 = b1;
				b1 = source[i];
			}else if(b2 < source[i]){
				b3 = b2;
				b2 = source[i];
			}else if(b3 < source[i]){
				b3 = source[i];
			}
		}
	}
	
}