import java.util.*;

public class Main {
	public static void main(String[] args){
		Scanner sc= new Scanner(System.in);
		int h1=-1,h2=-1,h3=-1;
		for(int i=0;i<10;i++){
			int h=sc.nextInt();
			if(h>h1){
				h3=h2;
				h2=h1;
				h1=h;
			}else if(h>h2){
				h3=h2;
				h2=h;
			}else if(h>h3){
				h3=h;
			}
		}
		System.out.println(h1);
		System.out.println(h2);
		System.out.println(h3);
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		Scanner sc= new Scanner(System.in);
		int h1=-1,h2=-1,h3=-1;
		for(int i=0;i<10;i++){
			int h=sc.nextInt();
			if(h>h1){
				h3=h2;
				h2=h1;
				h1=h;
			}else if(h>h2){
				h3=h2;
				h2=h;
			}else if(h>h3){
				h3=h;
			}
		}
		System.out.println(h1);
		System.out.println(h2);
		System.out.println(h3);
	}
} Main public static void main(String[] args){
		Scanner sc= new Scanner(System.in);
		int h1=-1,h2=-1,h3=-1;
		for(int i=0;i<10;i++){
			int h=sc.nextInt();
			if(h>h1){
				h3=h2;
				h2=h1;
				h1=h;
			}else if(h>h2){
				h3=h2;
				h2=h;
			}else if(h>h3){
				h3=h;
			}
		}
		System.out.println(h1);
		System.out.println(h2);
		System.out.println(h3);
	} main {
		Scanner sc= new Scanner(System.in);
		int h1=-1,h2=-1,h3=-1;
		for(int i=0;i<10;i++){
			int h=sc.nextInt();
			if(h>h1){
				h3=h2;
				h2=h1;
				h1=h;
			}else if(h>h2){
				h3=h2;
				h2=h;
			}else if(h>h3){
				h3=h;
			}
		}
		System.out.println(h1);
		System.out.println(h2);
		System.out.println(h3);
	} Scanner sc= new Scanner(System.in); sc new Scanner(System.in) int h1=-1 h1 -1 1 h2=-1 h2 -1 1 h3=-1; h3 -1 1 for(int i=0;i<10;i++){
			int h=sc.nextInt();
			if(h>h1){
				h3=h2;
				h2=h1;
				h1=h;
			}else if(h>h2){
				h3=h2;
				h2=h;
			}else if(h>h3){
				h3=h;
			}
		} int i=0; int i=0; i 0 i<10 i 10 i++ i++ i {
			int h=sc.nextInt();
			if(h>h1){
				h3=h2;
				h2=h1;
				h1=h;
			}else if(h>h2){
				h3=h2;
				h2=h;
			}else if(h>h3){
				h3=h;
			}
		} {
			int h=sc.nextInt();
			if(h>h1){
				h3=h2;
				h2=h1;
				h1=h;
			}else if(h>h2){
				h3=h2;
				h2=h;
			}else if(h>h3){
				h3=h;
			}
		} int h=sc.nextInt(); h sc.nextInt() sc.nextInt sc if(h>h1){
				h3=h2;
				h2=h1;
				h1=h;
			}else if(h>h2){
				h3=h2;
				h2=h;
			}else if(h>h3){
				h3=h;
			} h>h1 h h1 {
				h3=h2;
				h2=h1;
				h1=h;
			} h3=h2 h3 h2 h2=h1 h2 h1 h1=h h1 h if(h>h2){
				h3=h2;
				h2=h;
			}else if(h>h3){
				h3=h;
			} h>h2 h h2 {
				h3=h2;
				h2=h;
			} h3=h2 h3 h2 h2=h h2 h if(h>h3){
				h3=h;
			} h>h3 h h3 {
				h3=h;
			} h3=h h3 h System.out.println(h1) System.out.println System.out System System.out h1 System.out.println(h2) System.out.println System.out System System.out h2 System.out.println(h3) System.out.println System.out System System.out h3 String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc= new Scanner(System.in);
		int h1=-1,h2=-1,h3=-1;
		for(int i=0;i<10;i++){
			int h=sc.nextInt();
			if(h>h1){
				h3=h2;
				h2=h1;
				h1=h;
			}else if(h>h2){
				h3=h2;
				h2=h;
			}else if(h>h3){
				h3=h;
			}
		}
		System.out.println(h1);
		System.out.println(h2);
		System.out.println(h3);
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc= new Scanner(System.in);
		int h1=-1,h2=-1,h3=-1;
		for(int i=0;i<10;i++){
			int h=sc.nextInt();
			if(h>h1){
				h3=h2;
				h2=h1;
				h1=h;
			}else if(h>h2){
				h3=h2;
				h2=h;
			}else if(h>h3){
				h3=h;
			}
		}
		System.out.println(h1);
		System.out.println(h2);
		System.out.println(h3);
	}
} Main
import java.util.*;

public class Main {
	public static void main(String[] args){
		Scanner sc= new Scanner(System.in);
		int h1=-1,h2=-1,h3=-1;
		for(int i=0;i<10;i++){
			int h=sc.nextInt();
			if(h>h1){
				h3=h2;
				h2=h1;
				h1=h;
			}else if(h>h2){
				h3=h2;
				h2=h;
			}else if(h>h3){
				h3=h;
			}
		}
		System.out.println(h1);
		System.out.println(h2);
		System.out.println(h3);
	}
}