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

class Main {

	public static final int MAX = 200000;

	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int highest =0;
		int middle =0;
		int lowest =0;

		for(int i =0 ; i<10; i++){

			int now = Integer.parseInt(br.readLine());
			if(highest <= now){
				lowest = middle;
				middle = highest;
				highest= now;
			/*	System.out.println("h");*/
			}else if (middle <= now) {
				lowest = middle;
				middle = now;
				/*System.out.println("m");*/
			}else if (lowest <= now) {
				lowest = now;
				/*System.out.println("l");*/

			}
			/*System.out.println(highest+"\n"+middle+"\n"+lowest);*/

		}

		System.out.println(highest+"\n"+middle+"\n"+lowest);

	}

} 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 final int MAX = 200000;

	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int highest =0;
		int middle =0;
		int lowest =0;

		for(int i =0 ; i<10; i++){

			int now = Integer.parseInt(br.readLine());
			if(highest <= now){
				lowest = middle;
				middle = highest;
				highest= now;
			/*	System.out.println("h");*/
			}else if (middle <= now) {
				lowest = middle;
				middle = now;
				/*System.out.println("m");*/
			}else if (lowest <= now) {
				lowest = now;
				/*System.out.println("l");*/

			}
			/*System.out.println(highest+"\n"+middle+"\n"+lowest);*/

		}

		System.out.println(highest+"\n"+middle+"\n"+lowest);

	}

} Main public static final int MAX = 200000; MAX 200000 public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int highest =0;
		int middle =0;
		int lowest =0;

		for(int i =0 ; i<10; i++){

			int now = Integer.parseInt(br.readLine());
			if(highest <= now){
				lowest = middle;
				middle = highest;
				highest= now;
			/*	System.out.println("h");*/
			}else if (middle <= now) {
				lowest = middle;
				middle = now;
				/*System.out.println("m");*/
			}else if (lowest <= now) {
				lowest = now;
				/*System.out.println("l");*/

			}
			/*System.out.println(highest+"\n"+middle+"\n"+lowest);*/

		}

		System.out.println(highest+"\n"+middle+"\n"+lowest);

	} main {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int highest =0;
		int middle =0;
		int lowest =0;

		for(int i =0 ; i<10; i++){

			int now = Integer.parseInt(br.readLine());
			if(highest <= now){
				lowest = middle;
				middle = highest;
				highest= now;
			/*	System.out.println("h");*/
			}else if (middle <= now) {
				lowest = middle;
				middle = now;
				/*System.out.println("m");*/
			}else if (lowest <= now) {
				lowest = now;
				/*System.out.println("l");*/

			}
			/*System.out.println(highest+"\n"+middle+"\n"+lowest);*/

		}

		System.out.println(highest+"\n"+middle+"\n"+lowest);

	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int highest =0; highest 0 int middle =0; middle 0 int lowest =0; lowest 0 for(int i =0 ; i<10; i++){

			int now = Integer.parseInt(br.readLine());
			if(highest <= now){
				lowest = middle;
				middle = highest;
				highest= now;
			/*	System.out.println("h");*/
			}else if (middle <= now) {
				lowest = middle;
				middle = now;
				/*System.out.println("m");*/
			}else if (lowest <= now) {
				lowest = now;
				/*System.out.println("l");*/

			}
			/*System.out.println(highest+"\n"+middle+"\n"+lowest);*/

		} int i =0 ; int i =0 ; i 0 i<10 i 10 i++ i++ i {

			int now = Integer.parseInt(br.readLine());
			if(highest <= now){
				lowest = middle;
				middle = highest;
				highest= now;
			/*	System.out.println("h");*/
			}else if (middle <= now) {
				lowest = middle;
				middle = now;
				/*System.out.println("m");*/
			}else if (lowest <= now) {
				lowest = now;
				/*System.out.println("l");*/

			}
			/*System.out.println(highest+"\n"+middle+"\n"+lowest);*/

		} {

			int now = Integer.parseInt(br.readLine());
			if(highest <= now){
				lowest = middle;
				middle = highest;
				highest= now;
			/*	System.out.println("h");*/
			}else if (middle <= now) {
				lowest = middle;
				middle = now;
				/*System.out.println("m");*/
			}else if (lowest <= now) {
				lowest = now;
				/*System.out.println("l");*/

			}
			/*System.out.println(highest+"\n"+middle+"\n"+lowest);*/

		} int now = Integer.parseInt(br.readLine()); now Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br if(highest <= now){
				lowest = middle;
				middle = highest;
				highest= now;
			/*	System.out.println("h");*/
			}else if (middle <= now) {
				lowest = middle;
				middle = now;
				/*System.out.println("m");*/
			}else if (lowest <= now) {
				lowest = now;
				/*System.out.println("l");*/

			} highest <= now highest now {
				lowest = middle;
				middle = highest;
				highest= now;
			/*	System.out.println("h");*/
			} lowest = middle lowest middle middle = highest middle highest highest= now highest now if (middle <= now) {
				lowest = middle;
				middle = now;
				/*System.out.println("m");*/
			}else if (lowest <= now) {
				lowest = now;
				/*System.out.println("l");*/

			} middle <= now middle now {
				lowest = middle;
				middle = now;
				/*System.out.println("m");*/
			} lowest = middle lowest middle middle = now middle now if (lowest <= now) {
				lowest = now;
				/*System.out.println("l");*/

			} lowest <= now lowest now {
				lowest = now;
				/*System.out.println("l");*/

			} lowest = now lowest now System.out.println(highest+"\n"+middle+"\n"+lowest) System.out.println System.out System System.out highest+"\n"+middle+"\n"+lowest "\n" middle highest+"\n"+middle+"\n"+lowest highest "\n" middle "\n" lowest String[] args args
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

class Main {

	public static final int MAX = 200000;

	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int highest =0;
		int middle =0;
		int lowest =0;

		for(int i =0 ; i<10; i++){

			int now = Integer.parseInt(br.readLine());
			if(highest <= now){
				lowest = middle;
				middle = highest;
				highest= now;
			/*	System.out.println("h");*/
			}else if (middle <= now) {
				lowest = middle;
				middle = now;
				/*System.out.println("m");*/
			}else if (lowest <= now) {
				lowest = now;
				/*System.out.println("l");*/

			}
			/*System.out.println(highest+"\n"+middle+"\n"+lowest);*/

		}

		System.out.println(highest+"\n"+middle+"\n"+lowest);

	}

}