import java.util.Scanner;

public class Main {

	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		int[] list = new int[10];
		for(int i = 0; i < 10; ++i)
			list[i] = Integer.parseInt(sc.nextLine());
		QuickSort(list, 0, 10);
		for(int i = 9; i > 6; --i)
			System.out.println(list[i]);
	}
	
	public static void QuickSort(int[] array, int first, int n)
	{
		if(n<=1)
			return;		
		int Pivot = array[first + n/2 - 1];
		int Left = first;
		int Right = first + n - 1;
		while(Left <= Right)
		{
			while(array[Left] < Pivot)
				Left++;
			
			while(array[Right] > Pivot)
				Right--;
			if(Left <= Right)
			{
				int tmp = array[Left];
				array[Left] = array[Right];
				array[Right] = tmp;
				Left++;
		    	Right--;
			}
		}
		QuickSort(array, first, Right - first + 1);
		QuickSort(array, Left, first +  n  - Left );
	}

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

	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		int[] list = new int[10];
		for(int i = 0; i < 10; ++i)
			list[i] = Integer.parseInt(sc.nextLine());
		QuickSort(list, 0, 10);
		for(int i = 9; i > 6; --i)
			System.out.println(list[i]);
	}
	
	public static void QuickSort(int[] array, int first, int n)
	{
		if(n<=1)
			return;		
		int Pivot = array[first + n/2 - 1];
		int Left = first;
		int Right = first + n - 1;
		while(Left <= Right)
		{
			while(array[Left] < Pivot)
				Left++;
			
			while(array[Right] > Pivot)
				Right--;
			if(Left <= Right)
			{
				int tmp = array[Left];
				array[Left] = array[Right];
				array[Right] = tmp;
				Left++;
		    	Right--;
			}
		}
		QuickSort(array, first, Right - first + 1);
		QuickSort(array, Left, first +  n  - Left );
	}

} Main public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		int[] list = new int[10];
		for(int i = 0; i < 10; ++i)
			list[i] = Integer.parseInt(sc.nextLine());
		QuickSort(list, 0, 10);
		for(int i = 9; i > 6; --i)
			System.out.println(list[i]);
	} main {
		Scanner sc = new Scanner(System.in);
		int[] list = new int[10];
		for(int i = 0; i < 10; ++i)
			list[i] = Integer.parseInt(sc.nextLine());
		QuickSort(list, 0, 10);
		for(int i = 9; i > 6; --i)
			System.out.println(list[i]);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int[] list = new int[10]; list new int[10] 10 for(int i = 0; i < 10; ++i)
			list[i] = Integer.parseInt(sc.nextLine()); int i = 0; int i = 0; i 0 i < 10 i 10 ++i ++i i list[i] = Integer.parseInt(sc.nextLine()); list[i] = Integer.parseInt(sc.nextLine()) list[i] list i Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc QuickSort(list, 0, 10) QuickSort list 0 10 for(int i = 9; i > 6; --i)
			System.out.println(list[i]); int i = 9; int i = 9; i 9 i > 6 i 6 --i --i i System.out.println(list[i]); System.out.println(list[i]) System.out.println System.out System System.out list[i] list i String[] args args public static void QuickSort(int[] array, int first, int n)
	{
		if(n<=1)
			return;		
		int Pivot = array[first + n/2 - 1];
		int Left = first;
		int Right = first + n - 1;
		while(Left <= Right)
		{
			while(array[Left] < Pivot)
				Left++;
			
			while(array[Right] > Pivot)
				Right--;
			if(Left <= Right)
			{
				int tmp = array[Left];
				array[Left] = array[Right];
				array[Right] = tmp;
				Left++;
		    	Right--;
			}
		}
		QuickSort(array, first, Right - first + 1);
		QuickSort(array, Left, first +  n  - Left );
	} QuickSort {
		if(n<=1)
			return;		
		int Pivot = array[first + n/2 - 1];
		int Left = first;
		int Right = first + n - 1;
		while(Left <= Right)
		{
			while(array[Left] < Pivot)
				Left++;
			
			while(array[Right] > Pivot)
				Right--;
			if(Left <= Right)
			{
				int tmp = array[Left];
				array[Left] = array[Right];
				array[Right] = tmp;
				Left++;
		    	Right--;
			}
		}
		QuickSort(array, first, Right - first + 1);
		QuickSort(array, Left, first +  n  - Left );
	} if(n<=1)
			return; n<=1 n 1 return; int Pivot = array[first + n/2 - 1]; Pivot array[first + n/2 - 1] array first + n/2 - 1 first + n/2 first n/2 n 2 1 int Left = first; Left first int Right = first + n - 1; Right first + n - 1 first + n first n 1 while(Left <= Right)
		{
			while(array[Left] < Pivot)
				Left++;
			
			while(array[Right] > Pivot)
				Right--;
			if(Left <= Right)
			{
				int tmp = array[Left];
				array[Left] = array[Right];
				array[Right] = tmp;
				Left++;
		    	Right--;
			}
		} Left <= Right Left Right {
			while(array[Left] < Pivot)
				Left++;
			
			while(array[Right] > Pivot)
				Right--;
			if(Left <= Right)
			{
				int tmp = array[Left];
				array[Left] = array[Right];
				array[Right] = tmp;
				Left++;
		    	Right--;
			}
		} while(array[Left] < Pivot)
				Left++; array[Left] < Pivot array[Left] array Left Pivot Left++ Left while(array[Right] > Pivot)
				Right--; array[Right] > Pivot array[Right] array Right Pivot Right-- Right if(Left <= Right)
			{
				int tmp = array[Left];
				array[Left] = array[Right];
				array[Right] = tmp;
				Left++;
		    	Right--;
			} Left <= Right Left Right {
				int tmp = array[Left];
				array[Left] = array[Right];
				array[Right] = tmp;
				Left++;
		    	Right--;
			} int tmp = array[Left]; tmp array[Left] array Left array[Left] = array[Right] array[Left] array Left array[Right] array Right array[Right] = tmp array[Right] array Right tmp Left++ Left Right-- Right QuickSort(array, first, Right - first + 1) QuickSort array first Right - first + 1 Right - first Right first 1 QuickSort(array, Left, first +  n  - Left ) QuickSort array Left first +  n  - Left first +  n first n Left int[] array array int first first int n n public class Main {

	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		int[] list = new int[10];
		for(int i = 0; i < 10; ++i)
			list[i] = Integer.parseInt(sc.nextLine());
		QuickSort(list, 0, 10);
		for(int i = 9; i > 6; --i)
			System.out.println(list[i]);
	}
	
	public static void QuickSort(int[] array, int first, int n)
	{
		if(n<=1)
			return;		
		int Pivot = array[first + n/2 - 1];
		int Left = first;
		int Right = first + n - 1;
		while(Left <= Right)
		{
			while(array[Left] < Pivot)
				Left++;
			
			while(array[Right] > Pivot)
				Right--;
			if(Left <= Right)
			{
				int tmp = array[Left];
				array[Left] = array[Right];
				array[Right] = tmp;
				Left++;
		    	Right--;
			}
		}
		QuickSort(array, first, Right - first + 1);
		QuickSort(array, Left, first +  n  - Left );
	}

} public class Main {

	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		int[] list = new int[10];
		for(int i = 0; i < 10; ++i)
			list[i] = Integer.parseInt(sc.nextLine());
		QuickSort(list, 0, 10);
		for(int i = 9; i > 6; --i)
			System.out.println(list[i]);
	}
	
	public static void QuickSort(int[] array, int first, int n)
	{
		if(n<=1)
			return;		
		int Pivot = array[first + n/2 - 1];
		int Left = first;
		int Right = first + n - 1;
		while(Left <= Right)
		{
			while(array[Left] < Pivot)
				Left++;
			
			while(array[Right] > Pivot)
				Right--;
			if(Left <= Right)
			{
				int tmp = array[Left];
				array[Left] = array[Right];
				array[Right] = tmp;
				Left++;
		    	Right--;
			}
		}
		QuickSort(array, first, Right - first + 1);
		QuickSort(array, Left, first +  n  - Left );
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		int[] list = new int[10];
		for(int i = 0; i < 10; ++i)
			list[i] = Integer.parseInt(sc.nextLine());
		QuickSort(list, 0, 10);
		for(int i = 9; i > 6; --i)
			System.out.println(list[i]);
	}
	
	public static void QuickSort(int[] array, int first, int n)
	{
		if(n<=1)
			return;		
		int Pivot = array[first + n/2 - 1];
		int Left = first;
		int Right = first + n - 1;
		while(Left <= Right)
		{
			while(array[Left] < Pivot)
				Left++;
			
			while(array[Right] > Pivot)
				Right--;
			if(Left <= Right)
			{
				int tmp = array[Left];
				array[Left] = array[Right];
				array[Right] = tmp;
				Left++;
		    	Right--;
			}
		}
		QuickSort(array, first, Right - first + 1);
		QuickSort(array, Left, first +  n  - Left );
	}

} 