import java.util.*;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		
		final int DATA_SIZE = 10;
		int height;
		int first=-1,second=-1,third=-1;
		for(int i=0; i<DATA_SIZE; i++) {
			height = scanner.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.printf("%d\n%d\n%d\n",first, second, third);
	}

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

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		
		final int DATA_SIZE = 10;
		int height;
		int first=-1,second=-1,third=-1;
		for(int i=0; i<DATA_SIZE; i++) {
			height = scanner.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.printf("%d\n%d\n%d\n",first, second, third);
	}

} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		
		final int DATA_SIZE = 10;
		int height;
		int first=-1,second=-1,third=-1;
		for(int i=0; i<DATA_SIZE; i++) {
			height = scanner.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.printf("%d\n%d\n%d\n",first, second, third);
	} main {
		Scanner scanner = new Scanner(System.in);
		
		final int DATA_SIZE = 10;
		int height;
		int first=-1,second=-1,third=-1;
		for(int i=0; i<DATA_SIZE; i++) {
			height = scanner.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.printf("%d\n%d\n%d\n",first, second, third);
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) final int DATA_SIZE = 10; DATA_SIZE 10 int height; height int first=-1 first -1 1 second=-1 second -1 1 third=-1; third -1 1 for(int i=0; i<DATA_SIZE; i++) {
			height = scanner.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=0; int i=0; i 0 i<DATA_SIZE i DATA_SIZE i++ i++ i {
			height = scanner.nextInt();
			if(height>first) {
				third = second;
				second = first;
				first = height;
			} else if(height>second) {
				third = second;
				second = height;
			} else if(height>third) {
				third = height;
			}
		} {
			height = scanner.nextInt();
			if(height>first) {
				third = second;
				second = first;
				first = height;
			} else if(height>second) {
				third = second;
				second = height;
			} else if(height>third) {
				third = height;
			}
		} height = scanner.nextInt() height scanner.nextInt() scanner.nextInt scanner 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.printf("%d\n%d\n%d\n",first, second, third) System.out.printf System.out System System.out "%d\n%d\n%d\n" first second third String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		
		final int DATA_SIZE = 10;
		int height;
		int first=-1,second=-1,third=-1;
		for(int i=0; i<DATA_SIZE; i++) {
			height = scanner.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.printf("%d\n%d\n%d\n",first, second, third);
	}

} public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		
		final int DATA_SIZE = 10;
		int height;
		int first=-1,second=-1,third=-1;
		for(int i=0; i<DATA_SIZE; i++) {
			height = scanner.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.printf("%d\n%d\n%d\n",first, second, third);
	}

} Main
import java.util.*;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		
		final int DATA_SIZE = 10;
		int height;
		int first=-1,second=-1,third=-1;
		for(int i=0; i<DATA_SIZE; i++) {
			height = scanner.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.printf("%d\n%d\n%d\n",first, second, third);
	}

}