import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class Main {
	Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {

		@SuppressWarnings("resource")
		Scanner sc = new Scanner(System.in);

		int num1 = sc.nextInt();
		int num2 = sc.nextInt();
		int num3 = sc.nextInt();
		int num4 = sc.nextInt();
		int num5 = sc.nextInt();
		int num6 = sc.nextInt();
		int num7 = sc.nextInt();
		int num8 = sc.nextInt();
		int num9 = sc.nextInt();
		int num10 = sc.nextInt();

		checkNum(num1);
		checkNum(num2);
		checkNum(num3);
		checkNum(num4);
		checkNum(num5);
		checkNum(num6);
		checkNum(num7);
		checkNum(num8);
		checkNum(num9);
		checkNum(num10);

		List<Integer> list = new ArrayList<Integer>();

		list.add(num1);
		list.add(num2);
		list.add(num3);
		list.add(num4);
		list.add(num5);
		list.add(num6);
		list.add(num7);
		list.add(num8);
		list.add(num9);
		list.add(num10);

		Collections.sort(list);
		Collections.reverse(list);

		for(int cnt = 0; cnt < 3; cnt++){

			System.out.println(list.get(cnt));
		}


	}

	public static void checkNum(int x){

		if(x < 0 || 10000 < x){

			throw new IllegalArgumentException("out of range");

		}
	}

} import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {
	Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {

		@SuppressWarnings("resource")
		Scanner sc = new Scanner(System.in);

		int num1 = sc.nextInt();
		int num2 = sc.nextInt();
		int num3 = sc.nextInt();
		int num4 = sc.nextInt();
		int num5 = sc.nextInt();
		int num6 = sc.nextInt();
		int num7 = sc.nextInt();
		int num8 = sc.nextInt();
		int num9 = sc.nextInt();
		int num10 = sc.nextInt();

		checkNum(num1);
		checkNum(num2);
		checkNum(num3);
		checkNum(num4);
		checkNum(num5);
		checkNum(num6);
		checkNum(num7);
		checkNum(num8);
		checkNum(num9);
		checkNum(num10);

		List<Integer> list = new ArrayList<Integer>();

		list.add(num1);
		list.add(num2);
		list.add(num3);
		list.add(num4);
		list.add(num5);
		list.add(num6);
		list.add(num7);
		list.add(num8);
		list.add(num9);
		list.add(num10);

		Collections.sort(list);
		Collections.reverse(list);

		for(int cnt = 0; cnt < 3; cnt++){

			System.out.println(list.get(cnt));
		}


	}

	public static void checkNum(int x){

		if(x < 0 || 10000 < x){

			throw new IllegalArgumentException("out of range");

		}
	}

} Main Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) {

		@SuppressWarnings("resource")
		Scanner sc = new Scanner(System.in);

		int num1 = sc.nextInt();
		int num2 = sc.nextInt();
		int num3 = sc.nextInt();
		int num4 = sc.nextInt();
		int num5 = sc.nextInt();
		int num6 = sc.nextInt();
		int num7 = sc.nextInt();
		int num8 = sc.nextInt();
		int num9 = sc.nextInt();
		int num10 = sc.nextInt();

		checkNum(num1);
		checkNum(num2);
		checkNum(num3);
		checkNum(num4);
		checkNum(num5);
		checkNum(num6);
		checkNum(num7);
		checkNum(num8);
		checkNum(num9);
		checkNum(num10);

		List<Integer> list = new ArrayList<Integer>();

		list.add(num1);
		list.add(num2);
		list.add(num3);
		list.add(num4);
		list.add(num5);
		list.add(num6);
		list.add(num7);
		list.add(num8);
		list.add(num9);
		list.add(num10);

		Collections.sort(list);
		Collections.reverse(list);

		for(int cnt = 0; cnt < 3; cnt++){

			System.out.println(list.get(cnt));
		}


	} main {

		@SuppressWarnings("resource")
		Scanner sc = new Scanner(System.in);

		int num1 = sc.nextInt();
		int num2 = sc.nextInt();
		int num3 = sc.nextInt();
		int num4 = sc.nextInt();
		int num5 = sc.nextInt();
		int num6 = sc.nextInt();
		int num7 = sc.nextInt();
		int num8 = sc.nextInt();
		int num9 = sc.nextInt();
		int num10 = sc.nextInt();

		checkNum(num1);
		checkNum(num2);
		checkNum(num3);
		checkNum(num4);
		checkNum(num5);
		checkNum(num6);
		checkNum(num7);
		checkNum(num8);
		checkNum(num9);
		checkNum(num10);

		List<Integer> list = new ArrayList<Integer>();

		list.add(num1);
		list.add(num2);
		list.add(num3);
		list.add(num4);
		list.add(num5);
		list.add(num6);
		list.add(num7);
		list.add(num8);
		list.add(num9);
		list.add(num10);

		Collections.sort(list);
		Collections.reverse(list);

		for(int cnt = 0; cnt < 3; cnt++){

			System.out.println(list.get(cnt));
		}


	} @SuppressWarnings("resource")
		Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int num1 = sc.nextInt(); num1 sc.nextInt() sc.nextInt sc int num2 = sc.nextInt(); num2 sc.nextInt() sc.nextInt sc int num3 = sc.nextInt(); num3 sc.nextInt() sc.nextInt sc int num4 = sc.nextInt(); num4 sc.nextInt() sc.nextInt sc int num5 = sc.nextInt(); num5 sc.nextInt() sc.nextInt sc int num6 = sc.nextInt(); num6 sc.nextInt() sc.nextInt sc int num7 = sc.nextInt(); num7 sc.nextInt() sc.nextInt sc int num8 = sc.nextInt(); num8 sc.nextInt() sc.nextInt sc int num9 = sc.nextInt(); num9 sc.nextInt() sc.nextInt sc int num10 = sc.nextInt(); num10 sc.nextInt() sc.nextInt sc checkNum(num1) checkNum num1 checkNum(num2) checkNum num2 checkNum(num3) checkNum num3 checkNum(num4) checkNum num4 checkNum(num5) checkNum num5 checkNum(num6) checkNum num6 checkNum(num7) checkNum num7 checkNum(num8) checkNum num8 checkNum(num9) checkNum num9 checkNum(num10) checkNum num10 List<Integer> list = new ArrayList<Integer>(); list new ArrayList<Integer>() list.add(num1) list.add list num1 list.add(num2) list.add list num2 list.add(num3) list.add list num3 list.add(num4) list.add list num4 list.add(num5) list.add list num5 list.add(num6) list.add list num6 list.add(num7) list.add list num7 list.add(num8) list.add list num8 list.add(num9) list.add list num9 list.add(num10) list.add list num10 Collections.sort(list) Collections.sort Collections list Collections.reverse(list) Collections.reverse Collections list for(int cnt = 0; cnt < 3; cnt++){

			System.out.println(list.get(cnt));
		} int cnt = 0; int cnt = 0; cnt 0 cnt < 3 cnt 3 cnt++ cnt++ cnt {

			System.out.println(list.get(cnt));
		} {

			System.out.println(list.get(cnt));
		} System.out.println(list.get(cnt)) System.out.println System.out System System.out list.get(cnt) list.get list cnt String[] args args public static void checkNum(int x){

		if(x < 0 || 10000 < x){

			throw new IllegalArgumentException("out of range");

		}
	} checkNum {

		if(x < 0 || 10000 < x){

			throw new IllegalArgumentException("out of range");

		}
	} if(x < 0 || 10000 < x){

			throw new IllegalArgumentException("out of range");

		} x < 0 || 10000 < x x < 0 x 0 10000 < x 10000 x {

			throw new IllegalArgumentException("out of range");

		} throw new IllegalArgumentException("out of range"); new IllegalArgumentException("out of range") int x x public class Main {
	Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {

		@SuppressWarnings("resource")
		Scanner sc = new Scanner(System.in);

		int num1 = sc.nextInt();
		int num2 = sc.nextInt();
		int num3 = sc.nextInt();
		int num4 = sc.nextInt();
		int num5 = sc.nextInt();
		int num6 = sc.nextInt();
		int num7 = sc.nextInt();
		int num8 = sc.nextInt();
		int num9 = sc.nextInt();
		int num10 = sc.nextInt();

		checkNum(num1);
		checkNum(num2);
		checkNum(num3);
		checkNum(num4);
		checkNum(num5);
		checkNum(num6);
		checkNum(num7);
		checkNum(num8);
		checkNum(num9);
		checkNum(num10);

		List<Integer> list = new ArrayList<Integer>();

		list.add(num1);
		list.add(num2);
		list.add(num3);
		list.add(num4);
		list.add(num5);
		list.add(num6);
		list.add(num7);
		list.add(num8);
		list.add(num9);
		list.add(num10);

		Collections.sort(list);
		Collections.reverse(list);

		for(int cnt = 0; cnt < 3; cnt++){

			System.out.println(list.get(cnt));
		}


	}

	public static void checkNum(int x){

		if(x < 0 || 10000 < x){

			throw new IllegalArgumentException("out of range");

		}
	}

} public class Main {
	Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {

		@SuppressWarnings("resource")
		Scanner sc = new Scanner(System.in);

		int num1 = sc.nextInt();
		int num2 = sc.nextInt();
		int num3 = sc.nextInt();
		int num4 = sc.nextInt();
		int num5 = sc.nextInt();
		int num6 = sc.nextInt();
		int num7 = sc.nextInt();
		int num8 = sc.nextInt();
		int num9 = sc.nextInt();
		int num10 = sc.nextInt();

		checkNum(num1);
		checkNum(num2);
		checkNum(num3);
		checkNum(num4);
		checkNum(num5);
		checkNum(num6);
		checkNum(num7);
		checkNum(num8);
		checkNum(num9);
		checkNum(num10);

		List<Integer> list = new ArrayList<Integer>();

		list.add(num1);
		list.add(num2);
		list.add(num3);
		list.add(num4);
		list.add(num5);
		list.add(num6);
		list.add(num7);
		list.add(num8);
		list.add(num9);
		list.add(num10);

		Collections.sort(list);
		Collections.reverse(list);

		for(int cnt = 0; cnt < 3; cnt++){

			System.out.println(list.get(cnt));
		}


	}

	public static void checkNum(int x){

		if(x < 0 || 10000 < x){

			throw new IllegalArgumentException("out of range");

		}
	}

} Main
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class Main {
	Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {

		@SuppressWarnings("resource")
		Scanner sc = new Scanner(System.in);

		int num1 = sc.nextInt();
		int num2 = sc.nextInt();
		int num3 = sc.nextInt();
		int num4 = sc.nextInt();
		int num5 = sc.nextInt();
		int num6 = sc.nextInt();
		int num7 = sc.nextInt();
		int num8 = sc.nextInt();
		int num9 = sc.nextInt();
		int num10 = sc.nextInt();

		checkNum(num1);
		checkNum(num2);
		checkNum(num3);
		checkNum(num4);
		checkNum(num5);
		checkNum(num6);
		checkNum(num7);
		checkNum(num8);
		checkNum(num9);
		checkNum(num10);

		List<Integer> list = new ArrayList<Integer>();

		list.add(num1);
		list.add(num2);
		list.add(num3);
		list.add(num4);
		list.add(num5);
		list.add(num6);
		list.add(num7);
		list.add(num8);
		list.add(num9);
		list.add(num10);

		Collections.sort(list);
		Collections.reverse(list);

		for(int cnt = 0; cnt < 3; cnt++){

			System.out.println(list.get(cnt));
		}


	}

	public static void checkNum(int x){

		if(x < 0 || 10000 < x){

			throw new IllegalArgumentException("out of range");

		}
	}

}