import java.io.*;
public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		int height[] = new int[10];
		int out[] = {0,0,0}; 
		for(int i = 0; i < 10; i++){
			try{
				height[i] = Integer.parseInt(in.readLine());
//				System.out.println(height[i]);
			}catch(IOException e){}
		}
		for(int i = 0; i < height.length; i++){
			if(out[0] < height[i] ){
				out[2] = out[1];
				out[1] = out[0];
				out[0] = height[i];
			}else if(out[1] < height[i]){
				out[2] = out[1];
				out[1] = height[i];
			}else if(out[2] < height[i]){
				out[2] = height[i];
			}
		}
		//out?????°????????????
		for(int i = 0; i < out.length; i++){
			System.out.println(out[i]);
		}
	}

}
/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