import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int r1 = 0, r2 = 0, r3 = 0;
		for (int i = 0; i < 10; i++) {
			int n = scan.nextInt();
			if (r3 < n) {
				r3 = n;
				if (r2 < r3) {
					int t = r2;
					r2 = r3;
					r3 = t;
					if (r1 < r2) {
						t = r1;
						r1 = r2;
						r2 = t;
					}
				}
			}

		}
		System.out.println(r1);
		System.out.println(r2);
		System.out.println(r3);
		System.exit(0);
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int r1 = 0, r2 = 0, r3 = 0;
		for (int i = 0; i < 10; i++) {
			int n = scan.nextInt();
			if (r3 < n) {
				r3 = n;
				if (r2 < r3) {
					int t = r2;
					r2 = r3;
					r3 = t;
					if (r1 < r2) {
						t = r1;
						r1 = r2;
						r2 = t;
					}
				}
			}

		}
		System.out.println(r1);
		System.out.println(r2);
		System.out.println(r3);
		System.exit(0);
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int r1 = 0, r2 = 0, r3 = 0;
		for (int i = 0; i < 10; i++) {
			int n = scan.nextInt();
			if (r3 < n) {
				r3 = n;
				if (r2 < r3) {
					int t = r2;
					r2 = r3;
					r3 = t;
					if (r1 < r2) {
						t = r1;
						r1 = r2;
						r2 = t;
					}
				}
			}

		}
		System.out.println(r1);
		System.out.println(r2);
		System.out.println(r3);
		System.exit(0);
	} main {
		Scanner scan = new Scanner(System.in);
		int r1 = 0, r2 = 0, r3 = 0;
		for (int i = 0; i < 10; i++) {
			int n = scan.nextInt();
			if (r3 < n) {
				r3 = n;
				if (r2 < r3) {
					int t = r2;
					r2 = r3;
					r3 = t;
					if (r1 < r2) {
						t = r1;
						r1 = r2;
						r2 = t;
					}
				}
			}

		}
		System.out.println(r1);
		System.out.println(r2);
		System.out.println(r3);
		System.exit(0);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int r1 = 0 r1 0 r2 = 0 r2 0 r3 = 0; r3 0 for (int i = 0; i < 10; i++) {
			int n = scan.nextInt();
			if (r3 < n) {
				r3 = n;
				if (r2 < r3) {
					int t = r2;
					r2 = r3;
					r3 = t;
					if (r1 < r2) {
						t = r1;
						r1 = r2;
						r2 = t;
					}
				}
			}

		} int i = 0; int i = 0; i 0 i < 10 i 10 i++ i++ i {
			int n = scan.nextInt();
			if (r3 < n) {
				r3 = n;
				if (r2 < r3) {
					int t = r2;
					r2 = r3;
					r3 = t;
					if (r1 < r2) {
						t = r1;
						r1 = r2;
						r2 = t;
					}
				}
			}

		} {
			int n = scan.nextInt();
			if (r3 < n) {
				r3 = n;
				if (r2 < r3) {
					int t = r2;
					r2 = r3;
					r3 = t;
					if (r1 < r2) {
						t = r1;
						r1 = r2;
						r2 = t;
					}
				}
			}

		} int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan if (r3 < n) {
				r3 = n;
				if (r2 < r3) {
					int t = r2;
					r2 = r3;
					r3 = t;
					if (r1 < r2) {
						t = r1;
						r1 = r2;
						r2 = t;
					}
				}
			} r3 < n r3 n {
				r3 = n;
				if (r2 < r3) {
					int t = r2;
					r2 = r3;
					r3 = t;
					if (r1 < r2) {
						t = r1;
						r1 = r2;
						r2 = t;
					}
				}
			} r3 = n r3 n if (r2 < r3) {
					int t = r2;
					r2 = r3;
					r3 = t;
					if (r1 < r2) {
						t = r1;
						r1 = r2;
						r2 = t;
					}
				} r2 < r3 r2 r3 {
					int t = r2;
					r2 = r3;
					r3 = t;
					if (r1 < r2) {
						t = r1;
						r1 = r2;
						r2 = t;
					}
				} int t = r2; t r2 r2 = r3 r2 r3 r3 = t r3 t if (r1 < r2) {
						t = r1;
						r1 = r2;
						r2 = t;
					} r1 < r2 r1 r2 {
						t = r1;
						r1 = r2;
						r2 = t;
					} t = r1 t r1 r1 = r2 r1 r2 r2 = t r2 t System.out.println(r1) System.out.println System.out System System.out r1 System.out.println(r2) System.out.println System.out System System.out r2 System.out.println(r3) System.out.println System.out System System.out r3 System.exit(0) System.exit System 0 String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int r1 = 0, r2 = 0, r3 = 0;
		for (int i = 0; i < 10; i++) {
			int n = scan.nextInt();
			if (r3 < n) {
				r3 = n;
				if (r2 < r3) {
					int t = r2;
					r2 = r3;
					r3 = t;
					if (r1 < r2) {
						t = r1;
						r1 = r2;
						r2 = t;
					}
				}
			}

		}
		System.out.println(r1);
		System.out.println(r2);
		System.out.println(r3);
		System.exit(0);
	}
} public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int r1 = 0, r2 = 0, r3 = 0;
		for (int i = 0; i < 10; i++) {
			int n = scan.nextInt();
			if (r3 < n) {
				r3 = n;
				if (r2 < r3) {
					int t = r2;
					r2 = r3;
					r3 = t;
					if (r1 < r2) {
						t = r1;
						r1 = r2;
						r2 = t;
					}
				}
			}

		}
		System.out.println(r1);
		System.out.println(r2);
		System.out.println(r3);
		System.exit(0);
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int r1 = 0, r2 = 0, r3 = 0;
		for (int i = 0; i < 10; i++) {
			int n = scan.nextInt();
			if (r3 < n) {
				r3 = n;
				if (r2 < r3) {
					int t = r2;
					r2 = r3;
					r3 = t;
					if (r1 < r2) {
						t = r1;
						r1 = r2;
						r2 = t;
					}
				}
			}

		}
		System.out.println(r1);
		System.out.println(r2);
		System.out.println(r3);
		System.exit(0);
	}
}