import java.util.Scanner;

class Main {

	public static void main(String[] a) {
		// 入力
		Scanner sc = new Scanner(System.in);
		int result[] = new int[10];
		for (int i = 0; i < 10; i++) {
			result[i] = sc.nextInt();
		}
		sc.close();

		// 出力
		for (int i = 0; i < 3; i++) {
			int maxIndex = i;
			for (int j = i + 1; j < result.length; j++) {
				if (result[maxIndex] < result[j]) {
					maxIndex = j;
				}
			}
			System.out.println(result[maxIndex]);
			result[maxIndex] = 0;/*
			if (i < 2) {
				System.out.println();
			}*/
		}
	}
} import java.util.Scanner; Scanner java.util class Main {

	public static void main(String[] a) {
		// 入力
		Scanner sc = new Scanner(System.in);
		int result[] = new int[10];
		for (int i = 0; i < 10; i++) {
			result[i] = sc.nextInt();
		}
		sc.close();

		// 出力
		for (int i = 0; i < 3; i++) {
			int maxIndex = i;
			for (int j = i + 1; j < result.length; j++) {
				if (result[maxIndex] < result[j]) {
					maxIndex = j;
				}
			}
			System.out.println(result[maxIndex]);
			result[maxIndex] = 0;/*
			if (i < 2) {
				System.out.println();
			}*/
		}
	}
} Main public static void main(String[] a) {
		// 入力
		Scanner sc = new Scanner(System.in);
		int result[] = new int[10];
		for (int i = 0; i < 10; i++) {
			result[i] = sc.nextInt();
		}
		sc.close();

		// 出力
		for (int i = 0; i < 3; i++) {
			int maxIndex = i;
			for (int j = i + 1; j < result.length; j++) {
				if (result[maxIndex] < result[j]) {
					maxIndex = j;
				}
			}
			System.out.println(result[maxIndex]);
			result[maxIndex] = 0;/*
			if (i < 2) {
				System.out.println();
			}*/
		}
	} main {
		// 入力
		Scanner sc = new Scanner(System.in);
		int result[] = new int[10];
		for (int i = 0; i < 10; i++) {
			result[i] = sc.nextInt();
		}
		sc.close();

		// 出力
		for (int i = 0; i < 3; i++) {
			int maxIndex = i;
			for (int j = i + 1; j < result.length; j++) {
				if (result[maxIndex] < result[j]) {
					maxIndex = j;
				}
			}
			System.out.println(result[maxIndex]);
			result[maxIndex] = 0;/*
			if (i < 2) {
				System.out.println();
			}*/
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int result[] = new int[10]; result new int[10] 10 for (int i = 0; i < 10; i++) {
			result[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < 10 i 10 i++ i++ i {
			result[i] = sc.nextInt();
		} {
			result[i] = sc.nextInt();
		} result[i] = sc.nextInt() result[i] result i sc.nextInt() sc.nextInt sc sc.close() sc.close sc for (int i = 0; i < 3; i++) {
			int maxIndex = i;
			for (int j = i + 1; j < result.length; j++) {
				if (result[maxIndex] < result[j]) {
					maxIndex = j;
				}
			}
			System.out.println(result[maxIndex]);
			result[maxIndex] = 0;/*
			if (i < 2) {
				System.out.println();
			}*/
		} int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
			int maxIndex = i;
			for (int j = i + 1; j < result.length; j++) {
				if (result[maxIndex] < result[j]) {
					maxIndex = j;
				}
			}
			System.out.println(result[maxIndex]);
			result[maxIndex] = 0;/*
			if (i < 2) {
				System.out.println();
			}*/
		} {
			int maxIndex = i;
			for (int j = i + 1; j < result.length; j++) {
				if (result[maxIndex] < result[j]) {
					maxIndex = j;
				}
			}
			System.out.println(result[maxIndex]);
			result[maxIndex] = 0;/*
			if (i < 2) {
				System.out.println();
			}*/
		} int maxIndex = i; maxIndex i for (int j = i + 1; j < result.length; j++) {
				if (result[maxIndex] < result[j]) {
					maxIndex = j;
				}
			} int j = i + 1; int j = i + 1; j i + 1 i 1 j < result.length j result.length result result.length j++ j++ j {
				if (result[maxIndex] < result[j]) {
					maxIndex = j;
				}
			} {
				if (result[maxIndex] < result[j]) {
					maxIndex = j;
				}
			} if (result[maxIndex] < result[j]) {
					maxIndex = j;
				} result[maxIndex] < result[j] result[maxIndex] result maxIndex result[j] result j {
					maxIndex = j;
				} maxIndex = j maxIndex j System.out.println(result[maxIndex]) System.out.println System.out System System.out result[maxIndex] result maxIndex result[maxIndex] = 0 result[maxIndex] result maxIndex 0 String[] a a
import java.util.Scanner;

class Main {

	public static void main(String[] a) {
		// 入力
		Scanner sc = new Scanner(System.in);
		int result[] = new int[10];
		for (int i = 0; i < 10; i++) {
			result[i] = sc.nextInt();
		}
		sc.close();

		// 出力
		for (int i = 0; i < 3; i++) {
			int maxIndex = i;
			for (int j = i + 1; j < result.length; j++) {
				if (result[maxIndex] < result[j]) {
					maxIndex = j;
				}
			}
			System.out.println(result[maxIndex]);
			result[maxIndex] = 0;/*
			if (i < 2) {
				System.out.println();
			}*/
		}
	}
}