import java.util.Scanner;
public class Main
{
	public static void main(String[] args)
	{
		Scanner scan=new Scanner(System.in);
		int[] tops=new int[3];
		int height;
		for(int h=0;h<10;h++){
			height=scan.nextInt();
			for(int i=0;i<tops.length;i++){
				if(tops[i]<height){
					for(int j=tops.length-1;i<j;j--){
						tops[j]=tops[j-1];
					}
					tops[i]=height;
					break;
				}
			}
		}
		scan.close();
		for(int i=0;i<tops.length;i++){
			System.out.println(tops[i]);
		}
	}
} import java.util.Scanner; Scanner java.util public class Main
{
	public static void main(String[] args)
	{
		Scanner scan=new Scanner(System.in);
		int[] tops=new int[3];
		int height;
		for(int h=0;h<10;h++){
			height=scan.nextInt();
			for(int i=0;i<tops.length;i++){
				if(tops[i]<height){
					for(int j=tops.length-1;i<j;j--){
						tops[j]=tops[j-1];
					}
					tops[i]=height;
					break;
				}
			}
		}
		scan.close();
		for(int i=0;i<tops.length;i++){
			System.out.println(tops[i]);
		}
	}
} Main public static void main(String[] args)
	{
		Scanner scan=new Scanner(System.in);
		int[] tops=new int[3];
		int height;
		for(int h=0;h<10;h++){
			height=scan.nextInt();
			for(int i=0;i<tops.length;i++){
				if(tops[i]<height){
					for(int j=tops.length-1;i<j;j--){
						tops[j]=tops[j-1];
					}
					tops[i]=height;
					break;
				}
			}
		}
		scan.close();
		for(int i=0;i<tops.length;i++){
			System.out.println(tops[i]);
		}
	} main {
		Scanner scan=new Scanner(System.in);
		int[] tops=new int[3];
		int height;
		for(int h=0;h<10;h++){
			height=scan.nextInt();
			for(int i=0;i<tops.length;i++){
				if(tops[i]<height){
					for(int j=tops.length-1;i<j;j--){
						tops[j]=tops[j-1];
					}
					tops[i]=height;
					break;
				}
			}
		}
		scan.close();
		for(int i=0;i<tops.length;i++){
			System.out.println(tops[i]);
		}
	} Scanner scan=new Scanner(System.in); scan new Scanner(System.in) int[] tops=new int[3]; tops new int[3] 3 int height; height for(int h=0;h<10;h++){
			height=scan.nextInt();
			for(int i=0;i<tops.length;i++){
				if(tops[i]<height){
					for(int j=tops.length-1;i<j;j--){
						tops[j]=tops[j-1];
					}
					tops[i]=height;
					break;
				}
			}
		} int h=0; int h=0; h 0 h<10 h 10 h++ h++ h {
			height=scan.nextInt();
			for(int i=0;i<tops.length;i++){
				if(tops[i]<height){
					for(int j=tops.length-1;i<j;j--){
						tops[j]=tops[j-1];
					}
					tops[i]=height;
					break;
				}
			}
		} {
			height=scan.nextInt();
			for(int i=0;i<tops.length;i++){
				if(tops[i]<height){
					for(int j=tops.length-1;i<j;j--){
						tops[j]=tops[j-1];
					}
					tops[i]=height;
					break;
				}
			}
		} height=scan.nextInt() height scan.nextInt() scan.nextInt scan for(int i=0;i<tops.length;i++){
				if(tops[i]<height){
					for(int j=tops.length-1;i<j;j--){
						tops[j]=tops[j-1];
					}
					tops[i]=height;
					break;
				}
			} int i=0; int i=0; i 0 i<tops.length i tops.length tops tops.length i++ i++ i {
				if(tops[i]<height){
					for(int j=tops.length-1;i<j;j--){
						tops[j]=tops[j-1];
					}
					tops[i]=height;
					break;
				}
			} {
				if(tops[i]<height){
					for(int j=tops.length-1;i<j;j--){
						tops[j]=tops[j-1];
					}
					tops[i]=height;
					break;
				}
			} if(tops[i]<height){
					for(int j=tops.length-1;i<j;j--){
						tops[j]=tops[j-1];
					}
					tops[i]=height;
					break;
				} tops[i]<height tops[i] tops i height {
					for(int j=tops.length-1;i<j;j--){
						tops[j]=tops[j-1];
					}
					tops[i]=height;
					break;
				} for(int j=tops.length-1;i<j;j--){
						tops[j]=tops[j-1];
					} int j=tops.length-1; int j=tops.length-1; j tops.length-1 tops.length tops tops.length 1 i<j i j j-- j-- j {
						tops[j]=tops[j-1];
					} {
						tops[j]=tops[j-1];
					} tops[j]=tops[j-1] tops[j] tops j tops[j-1] tops j-1 j 1 tops[i]=height tops[i] tops i height break; scan.close() scan.close scan for(int i=0;i<tops.length;i++){
			System.out.println(tops[i]);
		} int i=0; int i=0; i 0 i<tops.length i tops.length tops tops.length i++ i++ i {
			System.out.println(tops[i]);
		} {
			System.out.println(tops[i]);
		} System.out.println(tops[i]) System.out.println System.out System System.out tops[i] tops i String[] args args public class Main
{
	public static void main(String[] args)
	{
		Scanner scan=new Scanner(System.in);
		int[] tops=new int[3];
		int height;
		for(int h=0;h<10;h++){
			height=scan.nextInt();
			for(int i=0;i<tops.length;i++){
				if(tops[i]<height){
					for(int j=tops.length-1;i<j;j--){
						tops[j]=tops[j-1];
					}
					tops[i]=height;
					break;
				}
			}
		}
		scan.close();
		for(int i=0;i<tops.length;i++){
			System.out.println(tops[i]);
		}
	}
} public class Main
{
	public static void main(String[] args)
	{
		Scanner scan=new Scanner(System.in);
		int[] tops=new int[3];
		int height;
		for(int h=0;h<10;h++){
			height=scan.nextInt();
			for(int i=0;i<tops.length;i++){
				if(tops[i]<height){
					for(int j=tops.length-1;i<j;j--){
						tops[j]=tops[j-1];
					}
					tops[i]=height;
					break;
				}
			}
		}
		scan.close();
		for(int i=0;i<tops.length;i++){
			System.out.println(tops[i]);
		}
	}
} Main
import java.util.Scanner;
public class Main
{
	public static void main(String[] args)
	{
		Scanner scan=new Scanner(System.in);
		int[] tops=new int[3];
		int height;
		for(int h=0;h<10;h++){
			height=scan.nextInt();
			for(int i=0;i<tops.length;i++){
				if(tops[i]<height){
					for(int j=tops.length-1;i<j;j--){
						tops[j]=tops[j-1];
					}
					tops[i]=height;
					break;
				}
			}
		}
		scan.close();
		for(int i=0;i<tops.length;i++){
			System.out.println(tops[i]);
		}
	}
}