import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int[] m=new int[4];
		m[0]=sc.nextInt();
		m[1]=sc.nextInt();
		m[2]=sc.nextInt();
		int work,a;
		for(int j=1;j<=2;j++){
			for(int i=j;i>0;i--){
				if(m[i-1]<m[i]){
					m[3]=m[i-1];
					m[i-1]=m[i];
					m[i]=m[3];
				}
			}
		}
		a=3;
		while(a<10){
			int i=2;
			work=sc.nextInt();
			a++;
			while(((i>=0) && work>m[i])){
					m[i+1]=m[i];
					i--;
			}
			if(i!=2){
				m[i+1]=work;
			}
		}
		
			System.out.println(m[0]+"\n"+m[1] + "\n"+m[2]);
		

	}

} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int[] m=new int[4];
		m[0]=sc.nextInt();
		m[1]=sc.nextInt();
		m[2]=sc.nextInt();
		int work,a;
		for(int j=1;j<=2;j++){
			for(int i=j;i>0;i--){
				if(m[i-1]<m[i]){
					m[3]=m[i-1];
					m[i-1]=m[i];
					m[i]=m[3];
				}
			}
		}
		a=3;
		while(a<10){
			int i=2;
			work=sc.nextInt();
			a++;
			while(((i>=0) && work>m[i])){
					m[i+1]=m[i];
					i--;
			}
			if(i!=2){
				m[i+1]=work;
			}
		}
		
			System.out.println(m[0]+"\n"+m[1] + "\n"+m[2]);
		

	}

} Main public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int[] m=new int[4];
		m[0]=sc.nextInt();
		m[1]=sc.nextInt();
		m[2]=sc.nextInt();
		int work,a;
		for(int j=1;j<=2;j++){
			for(int i=j;i>0;i--){
				if(m[i-1]<m[i]){
					m[3]=m[i-1];
					m[i-1]=m[i];
					m[i]=m[3];
				}
			}
		}
		a=3;
		while(a<10){
			int i=2;
			work=sc.nextInt();
			a++;
			while(((i>=0) && work>m[i])){
					m[i+1]=m[i];
					i--;
			}
			if(i!=2){
				m[i+1]=work;
			}
		}
		
			System.out.println(m[0]+"\n"+m[1] + "\n"+m[2]);
		

	} main {
		Scanner sc=new Scanner(System.in);
		int[] m=new int[4];
		m[0]=sc.nextInt();
		m[1]=sc.nextInt();
		m[2]=sc.nextInt();
		int work,a;
		for(int j=1;j<=2;j++){
			for(int i=j;i>0;i--){
				if(m[i-1]<m[i]){
					m[3]=m[i-1];
					m[i-1]=m[i];
					m[i]=m[3];
				}
			}
		}
		a=3;
		while(a<10){
			int i=2;
			work=sc.nextInt();
			a++;
			while(((i>=0) && work>m[i])){
					m[i+1]=m[i];
					i--;
			}
			if(i!=2){
				m[i+1]=work;
			}
		}
		
			System.out.println(m[0]+"\n"+m[1] + "\n"+m[2]);
		

	} Scanner sc=new Scanner(System.in); sc new Scanner(System.in) int[] m=new int[4]; m new int[4] 4 m[0]=sc.nextInt() m[0] m 0 sc.nextInt() sc.nextInt sc m[1]=sc.nextInt() m[1] m 1 sc.nextInt() sc.nextInt sc m[2]=sc.nextInt() m[2] m 2 sc.nextInt() sc.nextInt sc int work work a; a for(int j=1;j<=2;j++){
			for(int i=j;i>0;i--){
				if(m[i-1]<m[i]){
					m[3]=m[i-1];
					m[i-1]=m[i];
					m[i]=m[3];
				}
			}
		} int j=1; int j=1; j 1 j<=2 j 2 j++ j++ j {
			for(int i=j;i>0;i--){
				if(m[i-1]<m[i]){
					m[3]=m[i-1];
					m[i-1]=m[i];
					m[i]=m[3];
				}
			}
		} {
			for(int i=j;i>0;i--){
				if(m[i-1]<m[i]){
					m[3]=m[i-1];
					m[i-1]=m[i];
					m[i]=m[3];
				}
			}
		} for(int i=j;i>0;i--){
				if(m[i-1]<m[i]){
					m[3]=m[i-1];
					m[i-1]=m[i];
					m[i]=m[3];
				}
			} int i=j; int i=j; i j i>0 i 0 i-- i-- i {
				if(m[i-1]<m[i]){
					m[3]=m[i-1];
					m[i-1]=m[i];
					m[i]=m[3];
				}
			} {
				if(m[i-1]<m[i]){
					m[3]=m[i-1];
					m[i-1]=m[i];
					m[i]=m[3];
				}
			} if(m[i-1]<m[i]){
					m[3]=m[i-1];
					m[i-1]=m[i];
					m[i]=m[3];
				} m[i-1]<m[i] m[i-1] m i-1 i 1 m[i] m i {
					m[3]=m[i-1];
					m[i-1]=m[i];
					m[i]=m[3];
				} m[3]=m[i-1] m[3] m 3 m[i-1] m i-1 i 1 m[i-1]=m[i] m[i-1] m i-1 i 1 m[i] m i m[i]=m[3] m[i] m i m[3] m 3 a=3 a 3 while(a<10){
			int i=2;
			work=sc.nextInt();
			a++;
			while(((i>=0) && work>m[i])){
					m[i+1]=m[i];
					i--;
			}
			if(i!=2){
				m[i+1]=work;
			}
		} a<10 a 10 {
			int i=2;
			work=sc.nextInt();
			a++;
			while(((i>=0) && work>m[i])){
					m[i+1]=m[i];
					i--;
			}
			if(i!=2){
				m[i+1]=work;
			}
		} int i=2; i 2 work=sc.nextInt() work sc.nextInt() sc.nextInt sc a++ a while(((i>=0) && work>m[i])){
					m[i+1]=m[i];
					i--;
			} ((i>=0) && work>m[i]) (i>=0) i 0 work>m[i] work m[i] m i {
					m[i+1]=m[i];
					i--;
			} m[i+1]=m[i] m[i+1] m i+1 i 1 m[i] m i i-- i if(i!=2){
				m[i+1]=work;
			} i!=2 i 2 {
				m[i+1]=work;
			} m[i+1]=work m[i+1] m i+1 i 1 work System.out.println(m[0]+"\n"+m[1] + "\n"+m[2]) System.out.println System.out System System.out m[0]+"\n"+m[1] + "\n"+m[2] "\n" m[1] m[0]+"\n"+m[1] + "\n"+m[2] m[0] m 0 "\n" m[1] m 1 "\n" m[2] m 2 String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int[] m=new int[4];
		m[0]=sc.nextInt();
		m[1]=sc.nextInt();
		m[2]=sc.nextInt();
		int work,a;
		for(int j=1;j<=2;j++){
			for(int i=j;i>0;i--){
				if(m[i-1]<m[i]){
					m[3]=m[i-1];
					m[i-1]=m[i];
					m[i]=m[3];
				}
			}
		}
		a=3;
		while(a<10){
			int i=2;
			work=sc.nextInt();
			a++;
			while(((i>=0) && work>m[i])){
					m[i+1]=m[i];
					i--;
			}
			if(i!=2){
				m[i+1]=work;
			}
		}
		
			System.out.println(m[0]+"\n"+m[1] + "\n"+m[2]);
		

	}

} public class Main {
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int[] m=new int[4];
		m[0]=sc.nextInt();
		m[1]=sc.nextInt();
		m[2]=sc.nextInt();
		int work,a;
		for(int j=1;j<=2;j++){
			for(int i=j;i>0;i--){
				if(m[i-1]<m[i]){
					m[3]=m[i-1];
					m[i-1]=m[i];
					m[i]=m[3];
				}
			}
		}
		a=3;
		while(a<10){
			int i=2;
			work=sc.nextInt();
			a++;
			while(((i>=0) && work>m[i])){
					m[i+1]=m[i];
					i--;
			}
			if(i!=2){
				m[i+1]=work;
			}
		}
		
			System.out.println(m[0]+"\n"+m[1] + "\n"+m[2]);
		

	}

} Main
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int[] m=new int[4];
		m[0]=sc.nextInt();
		m[1]=sc.nextInt();
		m[2]=sc.nextInt();
		int work,a;
		for(int j=1;j<=2;j++){
			for(int i=j;i>0;i--){
				if(m[i-1]<m[i]){
					m[3]=m[i-1];
					m[i-1]=m[i];
					m[i]=m[3];
				}
			}
		}
		a=3;
		while(a<10){
			int i=2;
			work=sc.nextInt();
			a++;
			while(((i>=0) && work>m[i])){
					m[i+1]=m[i];
					i--;
			}
			if(i!=2){
				m[i+1]=work;
			}
		}
		
			System.out.println(m[0]+"\n"+m[1] + "\n"+m[2]);
		

	}

}