import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int top1 = 0,top2 = 0,top3 = 0;

		for (int i = 1;i <= 10;i++) {
			int hill = scanner.nextInt();

			if (hill >= top1) {
				top3 = top2;
				top2 = top1;
				top1 = hill;
			} else if (hill >= top2) {
				top3 = top2;
				top2 = hill;
			} else if (hill >= top3) {
				top3 = hill;
			}
		}

		System.out.println(top1);
		System.out.println(top2);
		System.out.println(top3);
	}
} import java.util.Scanner; Scanner java.util class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int top1 = 0,top2 = 0,top3 = 0;

		for (int i = 1;i <= 10;i++) {
			int hill = scanner.nextInt();

			if (hill >= top1) {
				top3 = top2;
				top2 = top1;
				top1 = hill;
			} else if (hill >= top2) {
				top3 = top2;
				top2 = hill;
			} else if (hill >= top3) {
				top3 = hill;
			}
		}

		System.out.println(top1);
		System.out.println(top2);
		System.out.println(top3);
	}
} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int top1 = 0,top2 = 0,top3 = 0;

		for (int i = 1;i <= 10;i++) {
			int hill = scanner.nextInt();

			if (hill >= top1) {
				top3 = top2;
				top2 = top1;
				top1 = hill;
			} else if (hill >= top2) {
				top3 = top2;
				top2 = hill;
			} else if (hill >= top3) {
				top3 = hill;
			}
		}

		System.out.println(top1);
		System.out.println(top2);
		System.out.println(top3);
	} main {
		Scanner scanner = new Scanner(System.in);
		int top1 = 0,top2 = 0,top3 = 0;

		for (int i = 1;i <= 10;i++) {
			int hill = scanner.nextInt();

			if (hill >= top1) {
				top3 = top2;
				top2 = top1;
				top1 = hill;
			} else if (hill >= top2) {
				top3 = top2;
				top2 = hill;
			} else if (hill >= top3) {
				top3 = hill;
			}
		}

		System.out.println(top1);
		System.out.println(top2);
		System.out.println(top3);
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int top1 = 0 top1 0 top2 = 0 top2 0 top3 = 0; top3 0 for (int i = 1;i <= 10;i++) {
			int hill = scanner.nextInt();

			if (hill >= top1) {
				top3 = top2;
				top2 = top1;
				top1 = hill;
			} else if (hill >= top2) {
				top3 = top2;
				top2 = hill;
			} else if (hill >= top3) {
				top3 = hill;
			}
		} int i = 1; int i = 1; i 1 i <= 10 i 10 i++ i++ i {
			int hill = scanner.nextInt();

			if (hill >= top1) {
				top3 = top2;
				top2 = top1;
				top1 = hill;
			} else if (hill >= top2) {
				top3 = top2;
				top2 = hill;
			} else if (hill >= top3) {
				top3 = hill;
			}
		} {
			int hill = scanner.nextInt();

			if (hill >= top1) {
				top3 = top2;
				top2 = top1;
				top1 = hill;
			} else if (hill >= top2) {
				top3 = top2;
				top2 = hill;
			} else if (hill >= top3) {
				top3 = hill;
			}
		} int hill = scanner.nextInt(); hill scanner.nextInt() scanner.nextInt scanner if (hill >= top1) {
				top3 = top2;
				top2 = top1;
				top1 = hill;
			} else if (hill >= top2) {
				top3 = top2;
				top2 = hill;
			} else if (hill >= top3) {
				top3 = hill;
			} hill >= top1 hill top1 {
				top3 = top2;
				top2 = top1;
				top1 = hill;
			} top3 = top2 top3 top2 top2 = top1 top2 top1 top1 = hill top1 hill if (hill >= top2) {
				top3 = top2;
				top2 = hill;
			} else if (hill >= top3) {
				top3 = hill;
			} hill >= top2 hill top2 {
				top3 = top2;
				top2 = hill;
			} top3 = top2 top3 top2 top2 = hill top2 hill if (hill >= top3) {
				top3 = hill;
			} hill >= top3 hill top3 {
				top3 = hill;
			} top3 = hill top3 hill System.out.println(top1) System.out.println System.out System System.out top1 System.out.println(top2) System.out.println System.out System System.out top2 System.out.println(top3) System.out.println System.out System System.out top3 String[] args args
import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int top1 = 0,top2 = 0,top3 = 0;

		for (int i = 1;i <= 10;i++) {
			int hill = scanner.nextInt();

			if (hill >= top1) {
				top3 = top2;
				top2 = top1;
				top1 = hill;
			} else if (hill >= top2) {
				top3 = top2;
				top2 = hill;
			} else if (hill >= top3) {
				top3 = hill;
			}
		}

		System.out.println(top1);
		System.out.println(top2);
		System.out.println(top3);
	}
}