import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		Calc calc = new Calc();
		int[] height = {0,0,0};
		int newh;
		;
		for(int cnt = 0;cnt<10;cnt++){
			newh = sc.nextInt();
			height = Calc.calc(newh, height);
		};
		System.out.println(height[0]);
		System.out.println(height[1]);
		System.out.println(height[2]);
	}
}

class Calc{
	//private static final int imax = 110;
	public static int[] calc(int h, int[] Pastheight){
		int Newheight[] = (int[])Pastheight.clone();
		if( (h > Pastheight[2]) && (h <= Pastheight[1])){
			Newheight[2] = h;
		}else if((h > Pastheight[1]) && (h <= Pastheight[0])){
			Newheight[1] = h;
			Newheight[2] = Pastheight[1];
		}else if(h > Pastheight[0]){
			Newheight[0] = h;
			Newheight[1] = Pastheight[0];
			Newheight[2] = Pastheight[1];
		}
	return Newheight;
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		Calc calc = new Calc();
		int[] height = {0,0,0};
		int newh;
		;
		for(int cnt = 0;cnt<10;cnt++){
			newh = sc.nextInt();
			height = Calc.calc(newh, height);
		};
		System.out.println(height[0]);
		System.out.println(height[1]);
		System.out.println(height[2]);
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		Calc calc = new Calc();
		int[] height = {0,0,0};
		int newh;
		;
		for(int cnt = 0;cnt<10;cnt++){
			newh = sc.nextInt();
			height = Calc.calc(newh, height);
		};
		System.out.println(height[0]);
		System.out.println(height[1]);
		System.out.println(height[2]);
	} main {
		Scanner sc = new Scanner(System.in);
		Calc calc = new Calc();
		int[] height = {0,0,0};
		int newh;
		;
		for(int cnt = 0;cnt<10;cnt++){
			newh = sc.nextInt();
			height = Calc.calc(newh, height);
		};
		System.out.println(height[0]);
		System.out.println(height[1]);
		System.out.println(height[2]);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) Calc calc = new Calc(); calc new Calc() int[] height = {0,0,0}; height {0,0,0} 0 0 0 int newh; newh for(int cnt = 0;cnt<10;cnt++){
			newh = sc.nextInt();
			height = Calc.calc(newh, height);
		} int cnt = 0; int cnt = 0; cnt 0 cnt<10 cnt 10 cnt++ cnt++ cnt {
			newh = sc.nextInt();
			height = Calc.calc(newh, height);
		} {
			newh = sc.nextInt();
			height = Calc.calc(newh, height);
		} newh = sc.nextInt() newh sc.nextInt() sc.nextInt sc height = Calc.calc(newh, height) height Calc.calc(newh, height) Calc.calc Calc newh height System.out.println(height[0]) System.out.println System.out System System.out height[0] height 0 System.out.println(height[1]) System.out.println System.out System System.out height[1] height 1 System.out.println(height[2]) System.out.println System.out System System.out height[2] height 2 String[] args args class Calc{
	//private static final int imax = 110;
	public static int[] calc(int h, int[] Pastheight){
		int Newheight[] = (int[])Pastheight.clone();
		if( (h > Pastheight[2]) && (h <= Pastheight[1])){
			Newheight[2] = h;
		}else if((h > Pastheight[1]) && (h <= Pastheight[0])){
			Newheight[1] = h;
			Newheight[2] = Pastheight[1];
		}else if(h > Pastheight[0]){
			Newheight[0] = h;
			Newheight[1] = Pastheight[0];
			Newheight[2] = Pastheight[1];
		}
	return Newheight;
	}
} Calc //private static final int imax = 110;
	public static int[] calc(int h, int[] Pastheight){
		int Newheight[] = (int[])Pastheight.clone();
		if( (h > Pastheight[2]) && (h <= Pastheight[1])){
			Newheight[2] = h;
		}else if((h > Pastheight[1]) && (h <= Pastheight[0])){
			Newheight[1] = h;
			Newheight[2] = Pastheight[1];
		}else if(h > Pastheight[0]){
			Newheight[0] = h;
			Newheight[1] = Pastheight[0];
			Newheight[2] = Pastheight[1];
		}
	return Newheight;
	} calc {
		int Newheight[] = (int[])Pastheight.clone();
		if( (h > Pastheight[2]) && (h <= Pastheight[1])){
			Newheight[2] = h;
		}else if((h > Pastheight[1]) && (h <= Pastheight[0])){
			Newheight[1] = h;
			Newheight[2] = Pastheight[1];
		}else if(h > Pastheight[0]){
			Newheight[0] = h;
			Newheight[1] = Pastheight[0];
			Newheight[2] = Pastheight[1];
		}
	return Newheight;
	} int Newheight[] = (int[])Pastheight.clone(); Newheight (int[])Pastheight.clone() Pastheight.clone Pastheight if( (h > Pastheight[2]) && (h <= Pastheight[1])){
			Newheight[2] = h;
		}else if((h > Pastheight[1]) && (h <= Pastheight[0])){
			Newheight[1] = h;
			Newheight[2] = Pastheight[1];
		}else if(h > Pastheight[0]){
			Newheight[0] = h;
			Newheight[1] = Pastheight[0];
			Newheight[2] = Pastheight[1];
		} (h > Pastheight[2]) && (h <= Pastheight[1]) (h > Pastheight[2]) h Pastheight[2] Pastheight 2 (h <= Pastheight[1]) h Pastheight[1] Pastheight 1 {
			Newheight[2] = h;
		} Newheight[2] = h Newheight[2] Newheight 2 h if((h > Pastheight[1]) && (h <= Pastheight[0])){
			Newheight[1] = h;
			Newheight[2] = Pastheight[1];
		}else if(h > Pastheight[0]){
			Newheight[0] = h;
			Newheight[1] = Pastheight[0];
			Newheight[2] = Pastheight[1];
		} (h > Pastheight[1]) && (h <= Pastheight[0]) (h > Pastheight[1]) h Pastheight[1] Pastheight 1 (h <= Pastheight[0]) h Pastheight[0] Pastheight 0 {
			Newheight[1] = h;
			Newheight[2] = Pastheight[1];
		} Newheight[1] = h Newheight[1] Newheight 1 h Newheight[2] = Pastheight[1] Newheight[2] Newheight 2 Pastheight[1] Pastheight 1 if(h > Pastheight[0]){
			Newheight[0] = h;
			Newheight[1] = Pastheight[0];
			Newheight[2] = Pastheight[1];
		} h > Pastheight[0] h Pastheight[0] Pastheight 0 {
			Newheight[0] = h;
			Newheight[1] = Pastheight[0];
			Newheight[2] = Pastheight[1];
		} Newheight[0] = h Newheight[0] Newheight 0 h Newheight[1] = Pastheight[0] Newheight[1] Newheight 1 Pastheight[0] Pastheight 0 Newheight[2] = Pastheight[1] Newheight[2] Newheight 2 Pastheight[1] Pastheight 1 return Newheight; Newheight int h h int[] Pastheight Pastheight public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		Calc calc = new Calc();
		int[] height = {0,0,0};
		int newh;
		;
		for(int cnt = 0;cnt<10;cnt++){
			newh = sc.nextInt();
			height = Calc.calc(newh, height);
		};
		System.out.println(height[0]);
		System.out.println(height[1]);
		System.out.println(height[2]);
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		Calc calc = new Calc();
		int[] height = {0,0,0};
		int newh;
		;
		for(int cnt = 0;cnt<10;cnt++){
			newh = sc.nextInt();
			height = Calc.calc(newh, height);
		};
		System.out.println(height[0]);
		System.out.println(height[1]);
		System.out.println(height[2]);
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		Calc calc = new Calc();
		int[] height = {0,0,0};
		int newh;
		;
		for(int cnt = 0;cnt<10;cnt++){
			newh = sc.nextInt();
			height = Calc.calc(newh, height);
		};
		System.out.println(height[0]);
		System.out.println(height[1]);
		System.out.println(height[2]);
	}
}

class Calc{
	//private static final int imax = 110;
	public static int[] calc(int h, int[] Pastheight){
		int Newheight[] = (int[])Pastheight.clone();
		if( (h > Pastheight[2]) && (h <= Pastheight[1])){
			Newheight[2] = h;
		}else if((h > Pastheight[1]) && (h <= Pastheight[0])){
			Newheight[1] = h;
			Newheight[2] = Pastheight[1];
		}else if(h > Pastheight[0]){
			Newheight[0] = h;
			Newheight[1] = Pastheight[0];
			Newheight[2] = Pastheight[1];
		}
	return Newheight;
	}
}