import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

class Main {

	public static void main (String [] a){

		int numMountain = 10;
		int minConst = 0;
		int maxConst = 10000;
		int[] mountainList = new int[numMountain];
		int topOne = 0;
		int topTwo = 0;
		int topThree = 0;
		
		BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
		String line;
		int i = 0;
		
		try {
			while (i < numMountain && (line = stdin.readLine()) != null && 
					line.length()!= 0 ) {
					
					try {
						int tempHeight = Integer.parseInt(line);
						if (tempHeight < minConst || tempHeight > maxConst) {
						} else {
							mountainList[i] = tempHeight;
							i++;
						}
					} catch (NumberFormatException e){
						// TODO Auto-generated catch block
						//e.printStackTrace();
					}
					
			}
			
			for (int j=0; j<numMountain; j++){
				if (mountainList[j] >= topOne){
					topThree = topTwo;
					topTwo = topOne;
					topOne = mountainList[j];
				} else if (mountainList[j] >= topTwo){
					topThree = topTwo;
					topTwo = mountainList[j];
				} else if (mountainList[j] >= topThree){
					topThree = mountainList[j];
				}
			}
			
			System.out.println(topOne +"\n"+ topTwo +"\n"+ topThree);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			//e.printStackTrace();
		}
	}
}
/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