import java.util.Scanner;

public class Main 
{
	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		int[] heights = new int[10];
		int temp;
		
		for(int i = 0; i < 10; i++)
		{
			heights[i] = Integer.parseInt(scan.nextLine());
		}
		
		for(int i = 0; i < heights.length; i++)
		{
			for(int k = 1; k < heights.length - i; k++)
			{
				if( heights[k-1] > heights[k])
				{
					temp = heights[k];
					heights[k] = heights[k-1];
					heights[k-1] = temp;
				}
			}
		}
		for(int i = heights.length - 1; i > heights.length - 4; i--)
		{
			System.out.println(heights[i]);
		}
		scan.close();
	}
} import java.util.Scanner; Scanner java.util public class Main 
{
	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		int[] heights = new int[10];
		int temp;
		
		for(int i = 0; i < 10; i++)
		{
			heights[i] = Integer.parseInt(scan.nextLine());
		}
		
		for(int i = 0; i < heights.length; i++)
		{
			for(int k = 1; k < heights.length - i; k++)
			{
				if( heights[k-1] > heights[k])
				{
					temp = heights[k];
					heights[k] = heights[k-1];
					heights[k-1] = temp;
				}
			}
		}
		for(int i = heights.length - 1; i > heights.length - 4; i--)
		{
			System.out.println(heights[i]);
		}
		scan.close();
	}
} Main public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		int[] heights = new int[10];
		int temp;
		
		for(int i = 0; i < 10; i++)
		{
			heights[i] = Integer.parseInt(scan.nextLine());
		}
		
		for(int i = 0; i < heights.length; i++)
		{
			for(int k = 1; k < heights.length - i; k++)
			{
				if( heights[k-1] > heights[k])
				{
					temp = heights[k];
					heights[k] = heights[k-1];
					heights[k-1] = temp;
				}
			}
		}
		for(int i = heights.length - 1; i > heights.length - 4; i--)
		{
			System.out.println(heights[i]);
		}
		scan.close();
	} main {
		Scanner scan = new Scanner(System.in);
		int[] heights = new int[10];
		int temp;
		
		for(int i = 0; i < 10; i++)
		{
			heights[i] = Integer.parseInt(scan.nextLine());
		}
		
		for(int i = 0; i < heights.length; i++)
		{
			for(int k = 1; k < heights.length - i; k++)
			{
				if( heights[k-1] > heights[k])
				{
					temp = heights[k];
					heights[k] = heights[k-1];
					heights[k-1] = temp;
				}
			}
		}
		for(int i = heights.length - 1; i > heights.length - 4; i--)
		{
			System.out.println(heights[i]);
		}
		scan.close();
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int[] heights = new int[10]; heights new int[10] 10 int temp; temp for(int i = 0; i < 10; i++)
		{
			heights[i] = Integer.parseInt(scan.nextLine());
		} int i = 0; int i = 0; i 0 i < 10 i 10 i++ i++ i {
			heights[i] = Integer.parseInt(scan.nextLine());
		} {
			heights[i] = Integer.parseInt(scan.nextLine());
		} heights[i] = Integer.parseInt(scan.nextLine()) heights[i] heights i Integer.parseInt(scan.nextLine()) Integer.parseInt Integer scan.nextLine() scan.nextLine scan for(int i = 0; i < heights.length; i++)
		{
			for(int k = 1; k < heights.length - i; k++)
			{
				if( heights[k-1] > heights[k])
				{
					temp = heights[k];
					heights[k] = heights[k-1];
					heights[k-1] = temp;
				}
			}
		} int i = 0; int i = 0; i 0 i < heights.length i heights.length heights heights.length i++ i++ i {
			for(int k = 1; k < heights.length - i; k++)
			{
				if( heights[k-1] > heights[k])
				{
					temp = heights[k];
					heights[k] = heights[k-1];
					heights[k-1] = temp;
				}
			}
		} {
			for(int k = 1; k < heights.length - i; k++)
			{
				if( heights[k-1] > heights[k])
				{
					temp = heights[k];
					heights[k] = heights[k-1];
					heights[k-1] = temp;
				}
			}
		} for(int k = 1; k < heights.length - i; k++)
			{
				if( heights[k-1] > heights[k])
				{
					temp = heights[k];
					heights[k] = heights[k-1];
					heights[k-1] = temp;
				}
			} int k = 1; int k = 1; k 1 k < heights.length - i k heights.length - i heights.length heights heights.length i k++ k++ k {
				if( heights[k-1] > heights[k])
				{
					temp = heights[k];
					heights[k] = heights[k-1];
					heights[k-1] = temp;
				}
			} {
				if( heights[k-1] > heights[k])
				{
					temp = heights[k];
					heights[k] = heights[k-1];
					heights[k-1] = temp;
				}
			} if( heights[k-1] > heights[k])
				{
					temp = heights[k];
					heights[k] = heights[k-1];
					heights[k-1] = temp;
				} heights[k-1] > heights[k] heights[k-1] heights k-1 k 1 heights[k] heights k {
					temp = heights[k];
					heights[k] = heights[k-1];
					heights[k-1] = temp;
				} temp = heights[k] temp heights[k] heights k heights[k] = heights[k-1] heights[k] heights k heights[k-1] heights k-1 k 1 heights[k-1] = temp heights[k-1] heights k-1 k 1 temp for(int i = heights.length - 1; i > heights.length - 4; i--)
		{
			System.out.println(heights[i]);
		} int i = heights.length - 1; int i = heights.length - 1; i heights.length - 1 heights.length heights heights.length 1 i > heights.length - 4 i heights.length - 4 heights.length heights heights.length 4 i-- i-- i {
			System.out.println(heights[i]);
		} {
			System.out.println(heights[i]);
		} System.out.println(heights[i]) System.out.println System.out System System.out heights[i] heights i scan.close() scan.close scan String[] args args public class Main 
{
	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		int[] heights = new int[10];
		int temp;
		
		for(int i = 0; i < 10; i++)
		{
			heights[i] = Integer.parseInt(scan.nextLine());
		}
		
		for(int i = 0; i < heights.length; i++)
		{
			for(int k = 1; k < heights.length - i; k++)
			{
				if( heights[k-1] > heights[k])
				{
					temp = heights[k];
					heights[k] = heights[k-1];
					heights[k-1] = temp;
				}
			}
		}
		for(int i = heights.length - 1; i > heights.length - 4; i--)
		{
			System.out.println(heights[i]);
		}
		scan.close();
	}
} public class Main 
{
	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		int[] heights = new int[10];
		int temp;
		
		for(int i = 0; i < 10; i++)
		{
			heights[i] = Integer.parseInt(scan.nextLine());
		}
		
		for(int i = 0; i < heights.length; i++)
		{
			for(int k = 1; k < heights.length - i; k++)
			{
				if( heights[k-1] > heights[k])
				{
					temp = heights[k];
					heights[k] = heights[k-1];
					heights[k-1] = temp;
				}
			}
		}
		for(int i = heights.length - 1; i > heights.length - 4; i--)
		{
			System.out.println(heights[i]);
		}
		scan.close();
	}
} Main
import java.util.Scanner;

public class Main 
{
	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		int[] heights = new int[10];
		int temp;
		
		for(int i = 0; i < 10; i++)
		{
			heights[i] = Integer.parseInt(scan.nextLine());
		}
		
		for(int i = 0; i < heights.length; i++)
		{
			for(int k = 1; k < heights.length - i; k++)
			{
				if( heights[k-1] > heights[k])
				{
					temp = heights[k];
					heights[k] = heights[k-1];
					heights[k-1] = temp;
				}
			}
		}
		for(int i = heights.length - 1; i > heights.length - 4; i--)
		{
			System.out.println(heights[i]);
		}
		scan.close();
	}
}