import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int[] hills = new int[10];
		
		int cnt = 0;
		while(cnt < 10) {
			int hill = Integer.parseInt(scan.next());
			if(hill >= 0 && hill <= 10000) {
				hills[cnt] = hill;
				cnt++;
			} else {
				continue;
			}
		}
		
		for(int i = 0; i < hills.length - 1; i++) {
			for(int j = hills.length - 1; j > i; j--) {
				if(hills[j] > hills[j - 1]) {
					int tmp = hills[j];
					hills[j] = hills[j - 1];
					hills[j - 1] = tmp;
				}
			}
		}
		
		for(int i = 0; i < 3; i++) {
			System.out.println(hills[i]);
		}
		
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int[] hills = new int[10];
		
		int cnt = 0;
		while(cnt < 10) {
			int hill = Integer.parseInt(scan.next());
			if(hill >= 0 && hill <= 10000) {
				hills[cnt] = hill;
				cnt++;
			} else {
				continue;
			}
		}
		
		for(int i = 0; i < hills.length - 1; i++) {
			for(int j = hills.length - 1; j > i; j--) {
				if(hills[j] > hills[j - 1]) {
					int tmp = hills[j];
					hills[j] = hills[j - 1];
					hills[j - 1] = tmp;
				}
			}
		}
		
		for(int i = 0; i < 3; i++) {
			System.out.println(hills[i]);
		}
		
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int[] hills = new int[10];
		
		int cnt = 0;
		while(cnt < 10) {
			int hill = Integer.parseInt(scan.next());
			if(hill >= 0 && hill <= 10000) {
				hills[cnt] = hill;
				cnt++;
			} else {
				continue;
			}
		}
		
		for(int i = 0; i < hills.length - 1; i++) {
			for(int j = hills.length - 1; j > i; j--) {
				if(hills[j] > hills[j - 1]) {
					int tmp = hills[j];
					hills[j] = hills[j - 1];
					hills[j - 1] = tmp;
				}
			}
		}
		
		for(int i = 0; i < 3; i++) {
			System.out.println(hills[i]);
		}
		
	} main {
		Scanner scan = new Scanner(System.in);
		int[] hills = new int[10];
		
		int cnt = 0;
		while(cnt < 10) {
			int hill = Integer.parseInt(scan.next());
			if(hill >= 0 && hill <= 10000) {
				hills[cnt] = hill;
				cnt++;
			} else {
				continue;
			}
		}
		
		for(int i = 0; i < hills.length - 1; i++) {
			for(int j = hills.length - 1; j > i; j--) {
				if(hills[j] > hills[j - 1]) {
					int tmp = hills[j];
					hills[j] = hills[j - 1];
					hills[j - 1] = tmp;
				}
			}
		}
		
		for(int i = 0; i < 3; i++) {
			System.out.println(hills[i]);
		}
		
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int[] hills = new int[10]; hills new int[10] 10 int cnt = 0; cnt 0 while(cnt < 10) {
			int hill = Integer.parseInt(scan.next());
			if(hill >= 0 && hill <= 10000) {
				hills[cnt] = hill;
				cnt++;
			} else {
				continue;
			}
		} cnt < 10 cnt 10 {
			int hill = Integer.parseInt(scan.next());
			if(hill >= 0 && hill <= 10000) {
				hills[cnt] = hill;
				cnt++;
			} else {
				continue;
			}
		} int hill = Integer.parseInt(scan.next()); hill Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan if(hill >= 0 && hill <= 10000) {
				hills[cnt] = hill;
				cnt++;
			} else {
				continue;
			} hill >= 0 && hill <= 10000 hill >= 0 hill 0 hill <= 10000 hill 10000 {
				hills[cnt] = hill;
				cnt++;
			} hills[cnt] = hill hills[cnt] hills cnt hill cnt++ cnt {
				continue;
			} continue; for(int i = 0; i < hills.length - 1; i++) {
			for(int j = hills.length - 1; j > i; j--) {
				if(hills[j] > hills[j - 1]) {
					int tmp = hills[j];
					hills[j] = hills[j - 1];
					hills[j - 1] = tmp;
				}
			}
		} int i = 0; int i = 0; i 0 i < hills.length - 1 i hills.length - 1 hills.length hills hills.length 1 i++ i++ i {
			for(int j = hills.length - 1; j > i; j--) {
				if(hills[j] > hills[j - 1]) {
					int tmp = hills[j];
					hills[j] = hills[j - 1];
					hills[j - 1] = tmp;
				}
			}
		} {
			for(int j = hills.length - 1; j > i; j--) {
				if(hills[j] > hills[j - 1]) {
					int tmp = hills[j];
					hills[j] = hills[j - 1];
					hills[j - 1] = tmp;
				}
			}
		} for(int j = hills.length - 1; j > i; j--) {
				if(hills[j] > hills[j - 1]) {
					int tmp = hills[j];
					hills[j] = hills[j - 1];
					hills[j - 1] = tmp;
				}
			} int j = hills.length - 1; int j = hills.length - 1; j hills.length - 1 hills.length hills hills.length 1 j > i j i j-- j-- j {
				if(hills[j] > hills[j - 1]) {
					int tmp = hills[j];
					hills[j] = hills[j - 1];
					hills[j - 1] = tmp;
				}
			} {
				if(hills[j] > hills[j - 1]) {
					int tmp = hills[j];
					hills[j] = hills[j - 1];
					hills[j - 1] = tmp;
				}
			} if(hills[j] > hills[j - 1]) {
					int tmp = hills[j];
					hills[j] = hills[j - 1];
					hills[j - 1] = tmp;
				} hills[j] > hills[j - 1] hills[j] hills j hills[j - 1] hills j - 1 j 1 {
					int tmp = hills[j];
					hills[j] = hills[j - 1];
					hills[j - 1] = tmp;
				} int tmp = hills[j]; tmp hills[j] hills j hills[j] = hills[j - 1] hills[j] hills j hills[j - 1] hills j - 1 j 1 hills[j - 1] = tmp hills[j - 1] hills j - 1 j 1 tmp for(int i = 0; i < 3; i++) {
			System.out.println(hills[i]);
		} int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
			System.out.println(hills[i]);
		} {
			System.out.println(hills[i]);
		} System.out.println(hills[i]) System.out.println System.out System System.out hills[i] hills i String[] args args public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int[] hills = new int[10];
		
		int cnt = 0;
		while(cnt < 10) {
			int hill = Integer.parseInt(scan.next());
			if(hill >= 0 && hill <= 10000) {
				hills[cnt] = hill;
				cnt++;
			} else {
				continue;
			}
		}
		
		for(int i = 0; i < hills.length - 1; i++) {
			for(int j = hills.length - 1; j > i; j--) {
				if(hills[j] > hills[j - 1]) {
					int tmp = hills[j];
					hills[j] = hills[j - 1];
					hills[j - 1] = tmp;
				}
			}
		}
		
		for(int i = 0; i < 3; i++) {
			System.out.println(hills[i]);
		}
		
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int[] hills = new int[10];
		
		int cnt = 0;
		while(cnt < 10) {
			int hill = Integer.parseInt(scan.next());
			if(hill >= 0 && hill <= 10000) {
				hills[cnt] = hill;
				cnt++;
			} else {
				continue;
			}
		}
		
		for(int i = 0; i < hills.length - 1; i++) {
			for(int j = hills.length - 1; j > i; j--) {
				if(hills[j] > hills[j - 1]) {
					int tmp = hills[j];
					hills[j] = hills[j - 1];
					hills[j - 1] = tmp;
				}
			}
		}
		
		for(int i = 0; i < 3; i++) {
			System.out.println(hills[i]);
		}
		
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int[] hills = new int[10];
		
		int cnt = 0;
		while(cnt < 10) {
			int hill = Integer.parseInt(scan.next());
			if(hill >= 0 && hill <= 10000) {
				hills[cnt] = hill;
				cnt++;
			} else {
				continue;
			}
		}
		
		for(int i = 0; i < hills.length - 1; i++) {
			for(int j = hills.length - 1; j > i; j--) {
				if(hills[j] > hills[j - 1]) {
					int tmp = hills[j];
					hills[j] = hills[j - 1];
					hills[j - 1] = tmp;
				}
			}
		}
		
		for(int i = 0; i < 3; i++) {
			System.out.println(hills[i]);
		}
		
	}
}