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

public class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {
		// TODO ?????????????????????????????????????????????
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		int[] input = new int[10];
		boolean[] checked = new boolean[10];
		
		for(int i = 0; i < 10; i++){
			input[i] = Integer.parseInt(br.readLine());
			checked[i] = false;
		}
		
		for(int i = 0 ; i < 3; i++){
			int maxIndex = -1;
			int max = -1;
			
			for(int j = 0; j < 10; j++){
				if(input[j] > max && checked[j] == false){
					max = input[j];
					maxIndex = j;
				}
			}
			
			checked[maxIndex] = true;
			System.out.println(input[maxIndex]);
		}
		
	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {
		// TODO ?????????????????????????????????????????????
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		int[] input = new int[10];
		boolean[] checked = new boolean[10];
		
		for(int i = 0; i < 10; i++){
			input[i] = Integer.parseInt(br.readLine());
			checked[i] = false;
		}
		
		for(int i = 0 ; i < 3; i++){
			int maxIndex = -1;
			int max = -1;
			
			for(int j = 0; j < 10; j++){
				if(input[j] > max && checked[j] == false){
					max = input[j];
					maxIndex = j;
				}
			}
			
			checked[maxIndex] = true;
			System.out.println(input[maxIndex]);
		}
		
	}

} Main public static void main(String[] args) throws NumberFormatException, IOException {
		// TODO ?????????????????????????????????????????????
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		int[] input = new int[10];
		boolean[] checked = new boolean[10];
		
		for(int i = 0; i < 10; i++){
			input[i] = Integer.parseInt(br.readLine());
			checked[i] = false;
		}
		
		for(int i = 0 ; i < 3; i++){
			int maxIndex = -1;
			int max = -1;
			
			for(int j = 0; j < 10; j++){
				if(input[j] > max && checked[j] == false){
					max = input[j];
					maxIndex = j;
				}
			}
			
			checked[maxIndex] = true;
			System.out.println(input[maxIndex]);
		}
		
	} main {
		// TODO ?????????????????????????????????????????????
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		int[] input = new int[10];
		boolean[] checked = new boolean[10];
		
		for(int i = 0; i < 10; i++){
			input[i] = Integer.parseInt(br.readLine());
			checked[i] = false;
		}
		
		for(int i = 0 ; i < 3; i++){
			int maxIndex = -1;
			int max = -1;
			
			for(int j = 0; j < 10; j++){
				if(input[j] > max && checked[j] == false){
					max = input[j];
					maxIndex = j;
				}
			}
			
			checked[maxIndex] = true;
			System.out.println(input[maxIndex]);
		}
		
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int[] input = new int[10]; input new int[10] 10 boolean[] checked = new boolean[10]; checked new boolean[10] 10 for(int i = 0; i < 10; i++){
			input[i] = Integer.parseInt(br.readLine());
			checked[i] = false;
		} int i = 0; int i = 0; i 0 i < 10 i 10 i++ i++ i {
			input[i] = Integer.parseInt(br.readLine());
			checked[i] = false;
		} {
			input[i] = Integer.parseInt(br.readLine());
			checked[i] = false;
		} input[i] = Integer.parseInt(br.readLine()) input[i] input i Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br checked[i] = false checked[i] checked i false for(int i = 0 ; i < 3; i++){
			int maxIndex = -1;
			int max = -1;
			
			for(int j = 0; j < 10; j++){
				if(input[j] > max && checked[j] == false){
					max = input[j];
					maxIndex = j;
				}
			}
			
			checked[maxIndex] = true;
			System.out.println(input[maxIndex]);
		} int i = 0 ; int i = 0 ; i 0 i < 3 i 3 i++ i++ i {
			int maxIndex = -1;
			int max = -1;
			
			for(int j = 0; j < 10; j++){
				if(input[j] > max && checked[j] == false){
					max = input[j];
					maxIndex = j;
				}
			}
			
			checked[maxIndex] = true;
			System.out.println(input[maxIndex]);
		} {
			int maxIndex = -1;
			int max = -1;
			
			for(int j = 0; j < 10; j++){
				if(input[j] > max && checked[j] == false){
					max = input[j];
					maxIndex = j;
				}
			}
			
			checked[maxIndex] = true;
			System.out.println(input[maxIndex]);
		} int maxIndex = -1; maxIndex -1 1 int max = -1; max -1 1 for(int j = 0; j < 10; j++){
				if(input[j] > max && checked[j] == false){
					max = input[j];
					maxIndex = j;
				}
			} int j = 0; int j = 0; j 0 j < 10 j 10 j++ j++ j {
				if(input[j] > max && checked[j] == false){
					max = input[j];
					maxIndex = j;
				}
			} {
				if(input[j] > max && checked[j] == false){
					max = input[j];
					maxIndex = j;
				}
			} if(input[j] > max && checked[j] == false){
					max = input[j];
					maxIndex = j;
				} input[j] > max && checked[j] == false input[j] > max input[j] input j max checked[j] == false checked[j] checked j false {
					max = input[j];
					maxIndex = j;
				} max = input[j] max input[j] input j maxIndex = j maxIndex j checked[maxIndex] = true checked[maxIndex] checked maxIndex true System.out.println(input[maxIndex]) System.out.println System.out System System.out input[maxIndex] input maxIndex String[] args args public class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {
		// TODO ?????????????????????????????????????????????
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		int[] input = new int[10];
		boolean[] checked = new boolean[10];
		
		for(int i = 0; i < 10; i++){
			input[i] = Integer.parseInt(br.readLine());
			checked[i] = false;
		}
		
		for(int i = 0 ; i < 3; i++){
			int maxIndex = -1;
			int max = -1;
			
			for(int j = 0; j < 10; j++){
				if(input[j] > max && checked[j] == false){
					max = input[j];
					maxIndex = j;
				}
			}
			
			checked[maxIndex] = true;
			System.out.println(input[maxIndex]);
		}
		
	}

} public class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {
		// TODO ?????????????????????????????????????????????
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		int[] input = new int[10];
		boolean[] checked = new boolean[10];
		
		for(int i = 0; i < 10; i++){
			input[i] = Integer.parseInt(br.readLine());
			checked[i] = false;
		}
		
		for(int i = 0 ; i < 3; i++){
			int maxIndex = -1;
			int max = -1;
			
			for(int j = 0; j < 10; j++){
				if(input[j] > max && checked[j] == false){
					max = input[j];
					maxIndex = j;
				}
			}
			
			checked[maxIndex] = true;
			System.out.println(input[maxIndex]);
		}
		
	}

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

public class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {
		// TODO ?????????????????????????????????????????????
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		int[] input = new int[10];
		boolean[] checked = new boolean[10];
		
		for(int i = 0; i < 10; i++){
			input[i] = Integer.parseInt(br.readLine());
			checked[i] = false;
		}
		
		for(int i = 0 ; i < 3; i++){
			int maxIndex = -1;
			int max = -1;
			
			for(int j = 0; j < 10; j++){
				if(input[j] > max && checked[j] == false){
					max = input[j];
					maxIndex = j;
				}
			}
			
			checked[maxIndex] = true;
			System.out.println(input[maxIndex]);
		}
		
	}

}