import java.util.Arrays;
import java.util.Scanner;

class Main {
	public static void main(String[] args){
		try(Scanner sc = new Scanner(System.in)){
			Highest3 h3 = new Highest3();
			for(int i=0;i<10;i++){
				int a=Integer.parseInt(sc.next());
				h3.renew(a);
			}
			for(int i=0;i<3;i++)System.out.println(h3.get(i));
		}
	}
}
class Highest3{
	private int[] height=new int[3];
	Highest3(){
		for(int i=0;i<3;i++)this.height[i]=0;
	}
	public void renew(int height){
		int[] h4= new int[4];
		for(int i=0;i<3;i++)h4[i]=this.height[i];
		h4[3]=height;
		Arrays.sort(h4);
		for(int i=0;i<3;i++)this.height[i]=h4[3-i];
	}
	public int get(int i){
		return this.height[i];
	}
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util class Main {
	public static void main(String[] args){
		try(Scanner sc = new Scanner(System.in)){
			Highest3 h3 = new Highest3();
			for(int i=0;i<10;i++){
				int a=Integer.parseInt(sc.next());
				h3.renew(a);
			}
			for(int i=0;i<3;i++)System.out.println(h3.get(i));
		}
	}
} Main public static void main(String[] args){
		try(Scanner sc = new Scanner(System.in)){
			Highest3 h3 = new Highest3();
			for(int i=0;i<10;i++){
				int a=Integer.parseInt(sc.next());
				h3.renew(a);
			}
			for(int i=0;i<3;i++)System.out.println(h3.get(i));
		}
	} main {
		try(Scanner sc = new Scanner(System.in)){
			Highest3 h3 = new Highest3();
			for(int i=0;i<10;i++){
				int a=Integer.parseInt(sc.next());
				h3.renew(a);
			}
			for(int i=0;i<3;i++)System.out.println(h3.get(i));
		}
	} try(Scanner sc = new Scanner(System.in)){
			Highest3 h3 = new Highest3();
			for(int i=0;i<10;i++){
				int a=Integer.parseInt(sc.next());
				h3.renew(a);
			}
			for(int i=0;i<3;i++)System.out.println(h3.get(i));
		} {
			Highest3 h3 = new Highest3();
			for(int i=0;i<10;i++){
				int a=Integer.parseInt(sc.next());
				h3.renew(a);
			}
			for(int i=0;i<3;i++)System.out.println(h3.get(i));
		} Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) Highest3 h3 = new Highest3(); h3 new Highest3() for(int i=0;i<10;i++){
				int a=Integer.parseInt(sc.next());
				h3.renew(a);
			} int i=0; int i=0; i 0 i<10 i 10 i++ i++ i {
				int a=Integer.parseInt(sc.next());
				h3.renew(a);
			} {
				int a=Integer.parseInt(sc.next());
				h3.renew(a);
			} int a=Integer.parseInt(sc.next()); a Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc h3.renew(a) h3.renew h3 a for(int i=0;i<3;i++)System.out.println(h3.get(i)); int i=0; int i=0; i 0 i<3 i 3 i++ i++ i System.out.println(h3.get(i)); System.out.println(h3.get(i)) System.out.println System.out System System.out h3.get(i) h3.get h3 i String[] args args class Highest3{
	private int[] height=new int[3];
	Highest3(){
		for(int i=0;i<3;i++)this.height[i]=0;
	}
	public void renew(int height){
		int[] h4= new int[4];
		for(int i=0;i<3;i++)h4[i]=this.height[i];
		h4[3]=height;
		Arrays.sort(h4);
		for(int i=0;i<3;i++)this.height[i]=h4[3-i];
	}
	public int get(int i){
		return this.height[i];
	}
} Highest3 private int[] height=new int[3]; height new int[3] 3 Highest3(){
		for(int i=0;i<3;i++)this.height[i]=0;
	} Highest3 {
		for(int i=0;i<3;i++)this.height[i]=0;
	} for(int i=0;i<3;i++)this.height[i]=0; int i=0; int i=0; i 0 i<3 i 3 i++ i++ i this.height[i]=0; this.height[i]=0 this.height[i] this.height this this.height i 0 public void renew(int height){
		int[] h4= new int[4];
		for(int i=0;i<3;i++)h4[i]=this.height[i];
		h4[3]=height;
		Arrays.sort(h4);
		for(int i=0;i<3;i++)this.height[i]=h4[3-i];
	} renew {
		int[] h4= new int[4];
		for(int i=0;i<3;i++)h4[i]=this.height[i];
		h4[3]=height;
		Arrays.sort(h4);
		for(int i=0;i<3;i++)this.height[i]=h4[3-i];
	} int[] h4= new int[4]; h4 new int[4] 4 for(int i=0;i<3;i++)h4[i]=this.height[i]; int i=0; int i=0; i 0 i<3 i 3 i++ i++ i h4[i]=this.height[i]; h4[i]=this.height[i] h4[i] h4 i this.height[i] this.height this this.height i h4[3]=height h4[3] h4 3 height Arrays.sort(h4) Arrays.sort Arrays h4 for(int i=0;i<3;i++)this.height[i]=h4[3-i]; int i=0; int i=0; i 0 i<3 i 3 i++ i++ i this.height[i]=h4[3-i]; this.height[i]=h4[3-i] this.height[i] this.height this this.height i h4[3-i] h4 3-i 3 i int height height public int get(int i){
		return this.height[i];
	} get {
		return this.height[i];
	} return this.height[i]; this.height[i] this.height this this.height i int i i
import java.util.Arrays;
import java.util.Scanner;

class Main {
	public static void main(String[] args){
		try(Scanner sc = new Scanner(System.in)){
			Highest3 h3 = new Highest3();
			for(int i=0;i<10;i++){
				int a=Integer.parseInt(sc.next());
				h3.renew(a);
			}
			for(int i=0;i<3;i++)System.out.println(h3.get(i));
		}
	}
}
class Highest3{
	private int[] height=new int[3];
	Highest3(){
		for(int i=0;i<3;i++)this.height[i]=0;
	}
	public void renew(int height){
		int[] h4= new int[4];
		for(int i=0;i<3;i++)h4[i]=this.height[i];
		h4[3]=height;
		Arrays.sort(h4);
		for(int i=0;i<3;i++)this.height[i]=h4[3-i];
	}
	public int get(int i){
		return this.height[i];
	}
}