import java.util.Scanner;

class Main {
	 public static void main(String[] a){
		 Scanner scan = new Scanner(System.in);

		 int[] m = new int[10];
		 int[] max = new int[3];
		 for(int i = 0; i < 10; i++){
			 m[i] = scan.nextInt();
			 if(m[i] >= max[0]){
				 max[2] = max[1];
				 max[1] = max[0];
				 max[0] = m[i];
			 }
			 else if(m[i] >= max[1]){
				 max[2] = max[1];
				 max[1] = m[i];
			 }
			 else if(m[i] >= max[2]){
				 max[2] = m[i];
			 }
		 }

		 for(int i = 0; i <= 2; i++){
			 System.out.println(max[i]);
		 }
	}
} import java.util.Scanner; Scanner java.util class Main {
	 public static void main(String[] a){
		 Scanner scan = new Scanner(System.in);

		 int[] m = new int[10];
		 int[] max = new int[3];
		 for(int i = 0; i < 10; i++){
			 m[i] = scan.nextInt();
			 if(m[i] >= max[0]){
				 max[2] = max[1];
				 max[1] = max[0];
				 max[0] = m[i];
			 }
			 else if(m[i] >= max[1]){
				 max[2] = max[1];
				 max[1] = m[i];
			 }
			 else if(m[i] >= max[2]){
				 max[2] = m[i];
			 }
		 }

		 for(int i = 0; i <= 2; i++){
			 System.out.println(max[i]);
		 }
	}
} Main public static void main(String[] a){
		 Scanner scan = new Scanner(System.in);

		 int[] m = new int[10];
		 int[] max = new int[3];
		 for(int i = 0; i < 10; i++){
			 m[i] = scan.nextInt();
			 if(m[i] >= max[0]){
				 max[2] = max[1];
				 max[1] = max[0];
				 max[0] = m[i];
			 }
			 else if(m[i] >= max[1]){
				 max[2] = max[1];
				 max[1] = m[i];
			 }
			 else if(m[i] >= max[2]){
				 max[2] = m[i];
			 }
		 }

		 for(int i = 0; i <= 2; i++){
			 System.out.println(max[i]);
		 }
	} main {
		 Scanner scan = new Scanner(System.in);

		 int[] m = new int[10];
		 int[] max = new int[3];
		 for(int i = 0; i < 10; i++){
			 m[i] = scan.nextInt();
			 if(m[i] >= max[0]){
				 max[2] = max[1];
				 max[1] = max[0];
				 max[0] = m[i];
			 }
			 else if(m[i] >= max[1]){
				 max[2] = max[1];
				 max[1] = m[i];
			 }
			 else if(m[i] >= max[2]){
				 max[2] = m[i];
			 }
		 }

		 for(int i = 0; i <= 2; i++){
			 System.out.println(max[i]);
		 }
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int[] m = new int[10]; m new int[10] 10 int[] max = new int[3]; max new int[3] 3 for(int i = 0; i < 10; i++){
			 m[i] = scan.nextInt();
			 if(m[i] >= max[0]){
				 max[2] = max[1];
				 max[1] = max[0];
				 max[0] = m[i];
			 }
			 else if(m[i] >= max[1]){
				 max[2] = max[1];
				 max[1] = m[i];
			 }
			 else if(m[i] >= max[2]){
				 max[2] = m[i];
			 }
		 } int i = 0; int i = 0; i 0 i < 10 i 10 i++ i++ i {
			 m[i] = scan.nextInt();
			 if(m[i] >= max[0]){
				 max[2] = max[1];
				 max[1] = max[0];
				 max[0] = m[i];
			 }
			 else if(m[i] >= max[1]){
				 max[2] = max[1];
				 max[1] = m[i];
			 }
			 else if(m[i] >= max[2]){
				 max[2] = m[i];
			 }
		 } {
			 m[i] = scan.nextInt();
			 if(m[i] >= max[0]){
				 max[2] = max[1];
				 max[1] = max[0];
				 max[0] = m[i];
			 }
			 else if(m[i] >= max[1]){
				 max[2] = max[1];
				 max[1] = m[i];
			 }
			 else if(m[i] >= max[2]){
				 max[2] = m[i];
			 }
		 } m[i] = scan.nextInt() m[i] m i scan.nextInt() scan.nextInt scan if(m[i] >= max[0]){
				 max[2] = max[1];
				 max[1] = max[0];
				 max[0] = m[i];
			 }
			 else if(m[i] >= max[1]){
				 max[2] = max[1];
				 max[1] = m[i];
			 }
			 else if(m[i] >= max[2]){
				 max[2] = m[i];
			 } m[i] >= max[0] m[i] m i max[0] max 0 {
				 max[2] = max[1];
				 max[1] = max[0];
				 max[0] = m[i];
			 } max[2] = max[1] max[2] max 2 max[1] max 1 max[1] = max[0] max[1] max 1 max[0] max 0 max[0] = m[i] max[0] max 0 m[i] m i if(m[i] >= max[1]){
				 max[2] = max[1];
				 max[1] = m[i];
			 }
			 else if(m[i] >= max[2]){
				 max[2] = m[i];
			 } m[i] >= max[1] m[i] m i max[1] max 1 {
				 max[2] = max[1];
				 max[1] = m[i];
			 } max[2] = max[1] max[2] max 2 max[1] max 1 max[1] = m[i] max[1] max 1 m[i] m i if(m[i] >= max[2]){
				 max[2] = m[i];
			 } m[i] >= max[2] m[i] m i max[2] max 2 {
				 max[2] = m[i];
			 } max[2] = m[i] max[2] max 2 m[i] m i for(int i = 0; i <= 2; i++){
			 System.out.println(max[i]);
		 } int i = 0; int i = 0; i 0 i <= 2 i 2 i++ i++ i {
			 System.out.println(max[i]);
		 } {
			 System.out.println(max[i]);
		 } System.out.println(max[i]) System.out.println System.out System System.out max[i] max i String[] a a
import java.util.Scanner;

class Main {
	 public static void main(String[] a){
		 Scanner scan = new Scanner(System.in);

		 int[] m = new int[10];
		 int[] max = new int[3];
		 for(int i = 0; i < 10; i++){
			 m[i] = scan.nextInt();
			 if(m[i] >= max[0]){
				 max[2] = max[1];
				 max[1] = max[0];
				 max[0] = m[i];
			 }
			 else if(m[i] >= max[1]){
				 max[2] = max[1];
				 max[1] = m[i];
			 }
			 else if(m[i] >= max[2]){
				 max[2] = m[i];
			 }
		 }

		 for(int i = 0; i <= 2; i++){
			 System.out.println(max[i]);
		 }
	}
}