import java.util.*;

class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int[] height = new int[10];
		for (int i = 0; i < 10; i++) {
			height[i] = scanner.nextInt();
		}
		Arrays.sort(height);
		System.out.println(height[9]);
		System.out.println(height[8]);
		System.out.println(height[7]);
	}
} import java.util.*; util.* java class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int[] height = new int[10];
		for (int i = 0; i < 10; i++) {
			height[i] = scanner.nextInt();
		}
		Arrays.sort(height);
		System.out.println(height[9]);
		System.out.println(height[8]);
		System.out.println(height[7]);
	}
} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int[] height = new int[10];
		for (int i = 0; i < 10; i++) {
			height[i] = scanner.nextInt();
		}
		Arrays.sort(height);
		System.out.println(height[9]);
		System.out.println(height[8]);
		System.out.println(height[7]);
	} main {
		Scanner scanner = new Scanner(System.in);
		int[] height = new int[10];
		for (int i = 0; i < 10; i++) {
			height[i] = scanner.nextInt();
		}
		Arrays.sort(height);
		System.out.println(height[9]);
		System.out.println(height[8]);
		System.out.println(height[7]);
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int[] height = new int[10]; height new int[10] 10 for (int i = 0; i < 10; i++) {
			height[i] = scanner.nextInt();
		} int i = 0; int i = 0; i 0 i < 10 i 10 i++ i++ i {
			height[i] = scanner.nextInt();
		} {
			height[i] = scanner.nextInt();
		} height[i] = scanner.nextInt() height[i] height i scanner.nextInt() scanner.nextInt scanner Arrays.sort(height) Arrays.sort Arrays height System.out.println(height[9]) System.out.println System.out System System.out height[9] height 9 System.out.println(height[8]) System.out.println System.out System System.out height[8] height 8 System.out.println(height[7]) System.out.println System.out System System.out height[7] height 7 String[] args args
import java.util.*;

class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int[] height = new int[10];
		for (int i = 0; i < 10; i++) {
			height[i] = scanner.nextInt();
		}
		Arrays.sort(height);
		System.out.println(height[9]);
		System.out.println(height[8]);
		System.out.println(height[7]);
	}
}