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();
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io 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();
		}
	}
} 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();
		}
	} main {

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