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]);
		

	}

}
/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz