import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int first = 0;
		int second = 0;
		int third = 0;
		for(int i=1; i<=10; i++) {
			int height = s.nextInt();
			if(height > first) {
				third = second;
				second = first;
				first = height;
			} else if(height > second) {
				third = second;
				second = height;
			} else if(height > third) {
				third = height;
			}
		}
		System.out.println(first);
		System.out.println(second);
		System.out.println(third);
		s.close();
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int first = 0;
		int second = 0;
		int third = 0;
		for(int i=1; i<=10; i++) {
			int height = s.nextInt();
			if(height > first) {
				third = second;
				second = first;
				first = height;
			} else if(height > second) {
				third = second;
				second = height;
			} else if(height > third) {
				third = height;
			}
		}
		System.out.println(first);
		System.out.println(second);
		System.out.println(third);
		s.close();
	}

} Main public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int first = 0;
		int second = 0;
		int third = 0;
		for(int i=1; i<=10; i++) {
			int height = s.nextInt();
			if(height > first) {
				third = second;
				second = first;
				first = height;
			} else if(height > second) {
				third = second;
				second = height;
			} else if(height > third) {
				third = height;
			}
		}
		System.out.println(first);
		System.out.println(second);
		System.out.println(third);
		s.close();
	} main {
		Scanner s = new Scanner(System.in);
		int first = 0;
		int second = 0;
		int third = 0;
		for(int i=1; i<=10; i++) {
			int height = s.nextInt();
			if(height > first) {
				third = second;
				second = first;
				first = height;
			} else if(height > second) {
				third = second;
				second = height;
			} else if(height > third) {
				third = height;
			}
		}
		System.out.println(first);
		System.out.println(second);
		System.out.println(third);
		s.close();
	} Scanner s = new Scanner(System.in); s new Scanner(System.in) int first = 0; first 0 int second = 0; second 0 int third = 0; third 0 for(int i=1; i<=10; i++) {
			int height = s.nextInt();
			if(height > first) {
				third = second;
				second = first;
				first = height;
			} else if(height > second) {
				third = second;
				second = height;
			} else if(height > third) {
				third = height;
			}
		} int i=1; int i=1; i 1 i<=10 i 10 i++ i++ i {
			int height = s.nextInt();
			if(height > first) {
				third = second;
				second = first;
				first = height;
			} else if(height > second) {
				third = second;
				second = height;
			} else if(height > third) {
				third = height;
			}
		} {
			int height = s.nextInt();
			if(height > first) {
				third = second;
				second = first;
				first = height;
			} else if(height > second) {
				third = second;
				second = height;
			} else if(height > third) {
				third = height;
			}
		} int height = s.nextInt(); height s.nextInt() s.nextInt s if(height > first) {
				third = second;
				second = first;
				first = height;
			} else if(height > second) {
				third = second;
				second = height;
			} else if(height > third) {
				third = height;
			} height > first height first {
				third = second;
				second = first;
				first = height;
			} third = second third second second = first second first first = height first height if(height > second) {
				third = second;
				second = height;
			} else if(height > third) {
				third = height;
			} height > second height second {
				third = second;
				second = height;
			} third = second third second second = height second height if(height > third) {
				third = height;
			} height > third height third {
				third = height;
			} third = height third height System.out.println(first) System.out.println System.out System System.out first System.out.println(second) System.out.println System.out System System.out second System.out.println(third) System.out.println System.out System System.out third s.close() s.close s String[] args args public class Main {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int first = 0;
		int second = 0;
		int third = 0;
		for(int i=1; i<=10; i++) {
			int height = s.nextInt();
			if(height > first) {
				third = second;
				second = first;
				first = height;
			} else if(height > second) {
				third = second;
				second = height;
			} else if(height > third) {
				third = height;
			}
		}
		System.out.println(first);
		System.out.println(second);
		System.out.println(third);
		s.close();
	}

} public class Main {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int first = 0;
		int second = 0;
		int third = 0;
		for(int i=1; i<=10; i++) {
			int height = s.nextInt();
			if(height > first) {
				third = second;
				second = first;
				first = height;
			} else if(height > second) {
				third = second;
				second = height;
			} else if(height > third) {
				third = height;
			}
		}
		System.out.println(first);
		System.out.println(second);
		System.out.println(third);
		s.close();
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int first = 0;
		int second = 0;
		int third = 0;
		for(int i=1; i<=10; i++) {
			int height = s.nextInt();
			if(height > first) {
				third = second;
				second = first;
				first = height;
			} else if(height > second) {
				third = second;
				second = height;
			} else if(height > third) {
				third = height;
			}
		}
		System.out.println(first);
		System.out.println(second);
		System.out.println(third);
		s.close();
	}

}