import java.util.Scanner;

public class Main {
	static Scanner scanner = new Scanner(System.in);
	static int Hillta[]= new int[10];

	public static void main(String args[]){
		for(int i=0; i <= 9; i++){
			Hillta[i] = S_content();
		}								//?±±????????????10????????\?????????
		judge();
	}

	public static int S_content(){
		int high = scanner.nextInt();
		return high;
	}

	public static void judge(){
		int rank1=0, rank2=0, rank3=0;
		rank1 = Hillta[0];
		for(int i=1; i <= 9; i++){
			//System.out.println("?????¨?????????:??????" + rank1+"??????"+ rank2 +"??????"+ rank3);
			if(Hillta[i] > rank3){
				if(Hillta[i] > rank2){
					if(Hillta[i] > rank1){
						rank3 = rank2;
						rank2 = rank1;
						rank1 = Hillta[i];

						//System.out.println("1??????"+rank1);
						continue;
					}
					rank3 = rank2;
					rank2 = Hillta[i];
					//System.out.println("2??????"+rank2);
					continue;
				}
				rank3 = Hillta[i];
				//System.out.println("3??????"+rank3);
				continue;
			}
		}
		System.out.println(rank1);
		System.out.println(rank2);
		System.out.println(rank3);

	}
} import java.util.Scanner; Scanner java.util public class Main {
	static Scanner scanner = new Scanner(System.in);
	static int Hillta[]= new int[10];

	public static void main(String args[]){
		for(int i=0; i <= 9; i++){
			Hillta[i] = S_content();
		}								//?±±????????????10????????\?????????
		judge();
	}

	public static int S_content(){
		int high = scanner.nextInt();
		return high;
	}

	public static void judge(){
		int rank1=0, rank2=0, rank3=0;
		rank1 = Hillta[0];
		for(int i=1; i <= 9; i++){
			//System.out.println("?????¨?????????:??????" + rank1+"??????"+ rank2 +"??????"+ rank3);
			if(Hillta[i] > rank3){
				if(Hillta[i] > rank2){
					if(Hillta[i] > rank1){
						rank3 = rank2;
						rank2 = rank1;
						rank1 = Hillta[i];

						//System.out.println("1??????"+rank1);
						continue;
					}
					rank3 = rank2;
					rank2 = Hillta[i];
					//System.out.println("2??????"+rank2);
					continue;
				}
				rank3 = Hillta[i];
				//System.out.println("3??????"+rank3);
				continue;
			}
		}
		System.out.println(rank1);
		System.out.println(rank2);
		System.out.println(rank3);

	}
} Main static Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) static int Hillta[]= new int[10]; Hillta new int[10] 10 public static void main(String args[]){
		for(int i=0; i <= 9; i++){
			Hillta[i] = S_content();
		}								//?±±????????????10????????\?????????
		judge();
	} main {
		for(int i=0; i <= 9; i++){
			Hillta[i] = S_content();
		}								//?±±????????????10????????\?????????
		judge();
	} for(int i=0; i <= 9; i++){
			Hillta[i] = S_content();
		}								//?±±????????????10????????\????????? int i=0; int i=0; i 0 i <= 9 i 9 i++ i++ i {
			Hillta[i] = S_content();
		}								//?±±????????????10????????\????????? {
			Hillta[i] = S_content();
		} Hillta[i] = S_content() Hillta[i] Hillta i S_content() S_content judge() judge String args[] args public static int S_content(){
		int high = scanner.nextInt();
		return high;
	} S_content {
		int high = scanner.nextInt();
		return high;
	} int high = scanner.nextInt(); high scanner.nextInt() scanner.nextInt scanner return high; high public static void judge(){
		int rank1=0, rank2=0, rank3=0;
		rank1 = Hillta[0];
		for(int i=1; i <= 9; i++){
			//System.out.println("?????¨?????????:??????" + rank1+"??????"+ rank2 +"??????"+ rank3);
			if(Hillta[i] > rank3){
				if(Hillta[i] > rank2){
					if(Hillta[i] > rank1){
						rank3 = rank2;
						rank2 = rank1;
						rank1 = Hillta[i];

						//System.out.println("1??????"+rank1);
						continue;
					}
					rank3 = rank2;
					rank2 = Hillta[i];
					//System.out.println("2??????"+rank2);
					continue;
				}
				rank3 = Hillta[i];
				//System.out.println("3??????"+rank3);
				continue;
			}
		}
		System.out.println(rank1);
		System.out.println(rank2);
		System.out.println(rank3);

	} judge {
		int rank1=0, rank2=0, rank3=0;
		rank1 = Hillta[0];
		for(int i=1; i <= 9; i++){
			//System.out.println("?????¨?????????:??????" + rank1+"??????"+ rank2 +"??????"+ rank3);
			if(Hillta[i] > rank3){
				if(Hillta[i] > rank2){
					if(Hillta[i] > rank1){
						rank3 = rank2;
						rank2 = rank1;
						rank1 = Hillta[i];

						//System.out.println("1??????"+rank1);
						continue;
					}
					rank3 = rank2;
					rank2 = Hillta[i];
					//System.out.println("2??????"+rank2);
					continue;
				}
				rank3 = Hillta[i];
				//System.out.println("3??????"+rank3);
				continue;
			}
		}
		System.out.println(rank1);
		System.out.println(rank2);
		System.out.println(rank3);

	} int rank1=0 rank1 0 rank2=0 rank2 0 rank3=0; rank3 0 rank1 = Hillta[0] rank1 Hillta[0] Hillta 0 for(int i=1; i <= 9; i++){
			//System.out.println("?????¨?????????:??????" + rank1+"??????"+ rank2 +"??????"+ rank3);
			if(Hillta[i] > rank3){
				if(Hillta[i] > rank2){
					if(Hillta[i] > rank1){
						rank3 = rank2;
						rank2 = rank1;
						rank1 = Hillta[i];

						//System.out.println("1??????"+rank1);
						continue;
					}
					rank3 = rank2;
					rank2 = Hillta[i];
					//System.out.println("2??????"+rank2);
					continue;
				}
				rank3 = Hillta[i];
				//System.out.println("3??????"+rank3);
				continue;
			}
		} int i=1; int i=1; i 1 i <= 9 i 9 i++ i++ i {
			//System.out.println("?????¨?????????:??????" + rank1+"??????"+ rank2 +"??????"+ rank3);
			if(Hillta[i] > rank3){
				if(Hillta[i] > rank2){
					if(Hillta[i] > rank1){
						rank3 = rank2;
						rank2 = rank1;
						rank1 = Hillta[i];

						//System.out.println("1??????"+rank1);
						continue;
					}
					rank3 = rank2;
					rank2 = Hillta[i];
					//System.out.println("2??????"+rank2);
					continue;
				}
				rank3 = Hillta[i];
				//System.out.println("3??????"+rank3);
				continue;
			}
		} {
			//System.out.println("?????¨?????????:??????" + rank1+"??????"+ rank2 +"??????"+ rank3);
			if(Hillta[i] > rank3){
				if(Hillta[i] > rank2){
					if(Hillta[i] > rank1){
						rank3 = rank2;
						rank2 = rank1;
						rank1 = Hillta[i];

						//System.out.println("1??????"+rank1);
						continue;
					}
					rank3 = rank2;
					rank2 = Hillta[i];
					//System.out.println("2??????"+rank2);
					continue;
				}
				rank3 = Hillta[i];
				//System.out.println("3??????"+rank3);
				continue;
			}
		} if(Hillta[i] > rank3){
				if(Hillta[i] > rank2){
					if(Hillta[i] > rank1){
						rank3 = rank2;
						rank2 = rank1;
						rank1 = Hillta[i];

						//System.out.println("1??????"+rank1);
						continue;
					}
					rank3 = rank2;
					rank2 = Hillta[i];
					//System.out.println("2??????"+rank2);
					continue;
				}
				rank3 = Hillta[i];
				//System.out.println("3??????"+rank3);
				continue;
			} Hillta[i] > rank3 Hillta[i] Hillta i rank3 {
				if(Hillta[i] > rank2){
					if(Hillta[i] > rank1){
						rank3 = rank2;
						rank2 = rank1;
						rank1 = Hillta[i];

						//System.out.println("1??????"+rank1);
						continue;
					}
					rank3 = rank2;
					rank2 = Hillta[i];
					//System.out.println("2??????"+rank2);
					continue;
				}
				rank3 = Hillta[i];
				//System.out.println("3??????"+rank3);
				continue;
			} if(Hillta[i] > rank2){
					if(Hillta[i] > rank1){
						rank3 = rank2;
						rank2 = rank1;
						rank1 = Hillta[i];

						//System.out.println("1??????"+rank1);
						continue;
					}
					rank3 = rank2;
					rank2 = Hillta[i];
					//System.out.println("2??????"+rank2);
					continue;
				} Hillta[i] > rank2 Hillta[i] Hillta i rank2 {
					if(Hillta[i] > rank1){
						rank3 = rank2;
						rank2 = rank1;
						rank1 = Hillta[i];

						//System.out.println("1??????"+rank1);
						continue;
					}
					rank3 = rank2;
					rank2 = Hillta[i];
					//System.out.println("2??????"+rank2);
					continue;
				} if(Hillta[i] > rank1){
						rank3 = rank2;
						rank2 = rank1;
						rank1 = Hillta[i];

						//System.out.println("1??????"+rank1);
						continue;
					} Hillta[i] > rank1 Hillta[i] Hillta i rank1 {
						rank3 = rank2;
						rank2 = rank1;
						rank1 = Hillta[i];

						//System.out.println("1??????"+rank1);
						continue;
					} rank3 = rank2 rank3 rank2 rank2 = rank1 rank2 rank1 rank1 = Hillta[i] rank1 Hillta[i] Hillta i continue; rank3 = rank2 rank3 rank2 rank2 = Hillta[i] rank2 Hillta[i] Hillta i continue; rank3 = Hillta[i] rank3 Hillta[i] Hillta i continue; System.out.println(rank1) System.out.println System.out System System.out rank1 System.out.println(rank2) System.out.println System.out System System.out rank2 System.out.println(rank3) System.out.println System.out System System.out rank3 public class Main {
	static Scanner scanner = new Scanner(System.in);
	static int Hillta[]= new int[10];

	public static void main(String args[]){
		for(int i=0; i <= 9; i++){
			Hillta[i] = S_content();
		}								//?±±????????????10????????\?????????
		judge();
	}

	public static int S_content(){
		int high = scanner.nextInt();
		return high;
	}

	public static void judge(){
		int rank1=0, rank2=0, rank3=0;
		rank1 = Hillta[0];
		for(int i=1; i <= 9; i++){
			//System.out.println("?????¨?????????:??????" + rank1+"??????"+ rank2 +"??????"+ rank3);
			if(Hillta[i] > rank3){
				if(Hillta[i] > rank2){
					if(Hillta[i] > rank1){
						rank3 = rank2;
						rank2 = rank1;
						rank1 = Hillta[i];

						//System.out.println("1??????"+rank1);
						continue;
					}
					rank3 = rank2;
					rank2 = Hillta[i];
					//System.out.println("2??????"+rank2);
					continue;
				}
				rank3 = Hillta[i];
				//System.out.println("3??????"+rank3);
				continue;
			}
		}
		System.out.println(rank1);
		System.out.println(rank2);
		System.out.println(rank3);

	}
} public class Main {
	static Scanner scanner = new Scanner(System.in);
	static int Hillta[]= new int[10];

	public static void main(String args[]){
		for(int i=0; i <= 9; i++){
			Hillta[i] = S_content();
		}								//?±±????????????10????????\?????????
		judge();
	}

	public static int S_content(){
		int high = scanner.nextInt();
		return high;
	}

	public static void judge(){
		int rank1=0, rank2=0, rank3=0;
		rank1 = Hillta[0];
		for(int i=1; i <= 9; i++){
			//System.out.println("?????¨?????????:??????" + rank1+"??????"+ rank2 +"??????"+ rank3);
			if(Hillta[i] > rank3){
				if(Hillta[i] > rank2){
					if(Hillta[i] > rank1){
						rank3 = rank2;
						rank2 = rank1;
						rank1 = Hillta[i];

						//System.out.println("1??????"+rank1);
						continue;
					}
					rank3 = rank2;
					rank2 = Hillta[i];
					//System.out.println("2??????"+rank2);
					continue;
				}
				rank3 = Hillta[i];
				//System.out.println("3??????"+rank3);
				continue;
			}
		}
		System.out.println(rank1);
		System.out.println(rank2);
		System.out.println(rank3);

	}
} Main
import java.util.Scanner;

public class Main {
	static Scanner scanner = new Scanner(System.in);
	static int Hillta[]= new int[10];

	public static void main(String args[]){
		for(int i=0; i <= 9; i++){
			Hillta[i] = S_content();
		}								//?±±????????????10????????\?????????
		judge();
	}

	public static int S_content(){
		int high = scanner.nextInt();
		return high;
	}

	public static void judge(){
		int rank1=0, rank2=0, rank3=0;
		rank1 = Hillta[0];
		for(int i=1; i <= 9; i++){
			//System.out.println("?????¨?????????:??????" + rank1+"??????"+ rank2 +"??????"+ rank3);
			if(Hillta[i] > rank3){
				if(Hillta[i] > rank2){
					if(Hillta[i] > rank1){
						rank3 = rank2;
						rank2 = rank1;
						rank1 = Hillta[i];

						//System.out.println("1??????"+rank1);
						continue;
					}
					rank3 = rank2;
					rank2 = Hillta[i];
					//System.out.println("2??????"+rank2);
					continue;
				}
				rank3 = Hillta[i];
				//System.out.println("3??????"+rank3);
				continue;
			}
		}
		System.out.println(rank1);
		System.out.println(rank2);
		System.out.println(rank3);

	}
}