import java.io.*;
import java.util.*;

public class Main
{
	public static void main(String[] args) throws Exception
	{
		Scanner scan = new Scanner(System.in);
		int[] arr = new int[10];
		for (int i = 0; i < 10; ++i){
			arr[i] = scan.nextInt();
			//System.out.println();
		}
		Arrays.sort(arr);
		System.out.println(arr[9]);
		System.out.println(arr[8]);
		System.out.println(arr[7]);
	}
} import java.io.*; io.* java import java.util.*; util.* java public class Main
{
	public static void main(String[] args) throws Exception
	{
		Scanner scan = new Scanner(System.in);
		int[] arr = new int[10];
		for (int i = 0; i < 10; ++i){
			arr[i] = scan.nextInt();
			//System.out.println();
		}
		Arrays.sort(arr);
		System.out.println(arr[9]);
		System.out.println(arr[8]);
		System.out.println(arr[7]);
	}
} Main public static void main(String[] args) throws Exception
	{
		Scanner scan = new Scanner(System.in);
		int[] arr = new int[10];
		for (int i = 0; i < 10; ++i){
			arr[i] = scan.nextInt();
			//System.out.println();
		}
		Arrays.sort(arr);
		System.out.println(arr[9]);
		System.out.println(arr[8]);
		System.out.println(arr[7]);
	} main {
		Scanner scan = new Scanner(System.in);
		int[] arr = new int[10];
		for (int i = 0; i < 10; ++i){
			arr[i] = scan.nextInt();
			//System.out.println();
		}
		Arrays.sort(arr);
		System.out.println(arr[9]);
		System.out.println(arr[8]);
		System.out.println(arr[7]);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int[] arr = new int[10]; arr new int[10] 10 for (int i = 0; i < 10; ++i){
			arr[i] = scan.nextInt();
			//System.out.println();
		} int i = 0; int i = 0; i 0 i < 10 i 10 ++i ++i i {
			arr[i] = scan.nextInt();
			//System.out.println();
		} {
			arr[i] = scan.nextInt();
			//System.out.println();
		} arr[i] = scan.nextInt() arr[i] arr i scan.nextInt() scan.nextInt scan Arrays.sort(arr) Arrays.sort Arrays arr System.out.println(arr[9]) System.out.println System.out System System.out arr[9] arr 9 System.out.println(arr[8]) System.out.println System.out System System.out arr[8] arr 8 System.out.println(arr[7]) System.out.println System.out System System.out arr[7] arr 7 String[] args args public class Main
{
	public static void main(String[] args) throws Exception
	{
		Scanner scan = new Scanner(System.in);
		int[] arr = new int[10];
		for (int i = 0; i < 10; ++i){
			arr[i] = scan.nextInt();
			//System.out.println();
		}
		Arrays.sort(arr);
		System.out.println(arr[9]);
		System.out.println(arr[8]);
		System.out.println(arr[7]);
	}
} public class Main
{
	public static void main(String[] args) throws Exception
	{
		Scanner scan = new Scanner(System.in);
		int[] arr = new int[10];
		for (int i = 0; i < 10; ++i){
			arr[i] = scan.nextInt();
			//System.out.println();
		}
		Arrays.sort(arr);
		System.out.println(arr[9]);
		System.out.println(arr[8]);
		System.out.println(arr[7]);
	}
} Main
import java.io.*;
import java.util.*;

public class Main
{
	public static void main(String[] args) throws Exception
	{
		Scanner scan = new Scanner(System.in);
		int[] arr = new int[10];
		for (int i = 0; i < 10; ++i){
			arr[i] = scan.nextInt();
			//System.out.println();
		}
		Arrays.sort(arr);
		System.out.println(arr[9]);
		System.out.println(arr[8]);
		System.out.println(arr[7]);
	}
}