import java.util.Arrays;
import java.util.Scanner;

class Main{
	public static void main(String[] args) {
		int[] intList = new int[10];
		Scanner sc = new Scanner(System.in);
		for (int count = 0; count < 10; count++) {
			int temp = sc.nextInt();
			if (temp <= 10000) {
				intList[count] = temp;
			}
		}
		Arrays.sort(intList);
		for (int j = 9; j >= 7; j--) {
			System.out.println(intList[j]);
		}
		sc.close();
	}
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util class Main{
	public static void main(String[] args) {
		int[] intList = new int[10];
		Scanner sc = new Scanner(System.in);
		for (int count = 0; count < 10; count++) {
			int temp = sc.nextInt();
			if (temp <= 10000) {
				intList[count] = temp;
			}
		}
		Arrays.sort(intList);
		for (int j = 9; j >= 7; j--) {
			System.out.println(intList[j]);
		}
		sc.close();
	}
} Main public static void main(String[] args) {
		int[] intList = new int[10];
		Scanner sc = new Scanner(System.in);
		for (int count = 0; count < 10; count++) {
			int temp = sc.nextInt();
			if (temp <= 10000) {
				intList[count] = temp;
			}
		}
		Arrays.sort(intList);
		for (int j = 9; j >= 7; j--) {
			System.out.println(intList[j]);
		}
		sc.close();
	} main {
		int[] intList = new int[10];
		Scanner sc = new Scanner(System.in);
		for (int count = 0; count < 10; count++) {
			int temp = sc.nextInt();
			if (temp <= 10000) {
				intList[count] = temp;
			}
		}
		Arrays.sort(intList);
		for (int j = 9; j >= 7; j--) {
			System.out.println(intList[j]);
		}
		sc.close();
	} int[] intList = new int[10]; intList new int[10] 10 Scanner sc = new Scanner(System.in); sc new Scanner(System.in) for (int count = 0; count < 10; count++) {
			int temp = sc.nextInt();
			if (temp <= 10000) {
				intList[count] = temp;
			}
		} int count = 0; int count = 0; count 0 count < 10 count 10 count++ count++ count {
			int temp = sc.nextInt();
			if (temp <= 10000) {
				intList[count] = temp;
			}
		} {
			int temp = sc.nextInt();
			if (temp <= 10000) {
				intList[count] = temp;
			}
		} int temp = sc.nextInt(); temp sc.nextInt() sc.nextInt sc if (temp <= 10000) {
				intList[count] = temp;
			} temp <= 10000 temp 10000 {
				intList[count] = temp;
			} intList[count] = temp intList[count] intList count temp Arrays.sort(intList) Arrays.sort Arrays intList for (int j = 9; j >= 7; j--) {
			System.out.println(intList[j]);
		} int j = 9; int j = 9; j 9 j >= 7 j 7 j-- j-- j {
			System.out.println(intList[j]);
		} {
			System.out.println(intList[j]);
		} System.out.println(intList[j]) System.out.println System.out System System.out intList[j] intList j sc.close() sc.close sc String[] args args
import java.util.Arrays;
import java.util.Scanner;

class Main{
	public static void main(String[] args) {
		int[] intList = new int[10];
		Scanner sc = new Scanner(System.in);
		for (int count = 0; count < 10; count++) {
			int temp = sc.nextInt();
			if (temp <= 10000) {
				intList[count] = temp;
			}
		}
		Arrays.sort(intList);
		for (int j = 9; j >= 7; j--) {
			System.out.println(intList[j]);
		}
		sc.close();
	}
}