import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws Exception {
		// TODO ?????????????????????????????????????????????
		int[] arg =new int[10];
        int i=0;
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
            String line;
            while ((line = br.readLine()) != null) {
                String tokens = line;
                arg[i] = Integer.parseInt(tokens);
                i++;
            }
        }



		int[] store=new int[3];
		for(i=0;i<10;i++){
			int s=arg[i];
			for(int j=0;j<3;j++){
				if(s>store[j]){
					if(j==0){
						store[j+2]=store[j+1];
						store[j+1]=store[j];
						store[j]=s;
						break;
					}else if(j==1){
						store[j+1]=store[j];
						store[j]=s;
						break;
					}else{
						store[j]=s;
					}
				}
			}
		}
		for(i=0;i<store.length;i++){
			System.out.println(store[i]);
		}
	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	public static void main(String[] args) throws Exception {
		// TODO ?????????????????????????????????????????????
		int[] arg =new int[10];
        int i=0;
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
            String line;
            while ((line = br.readLine()) != null) {
                String tokens = line;
                arg[i] = Integer.parseInt(tokens);
                i++;
            }
        }



		int[] store=new int[3];
		for(i=0;i<10;i++){
			int s=arg[i];
			for(int j=0;j<3;j++){
				if(s>store[j]){
					if(j==0){
						store[j+2]=store[j+1];
						store[j+1]=store[j];
						store[j]=s;
						break;
					}else if(j==1){
						store[j+1]=store[j];
						store[j]=s;
						break;
					}else{
						store[j]=s;
					}
				}
			}
		}
		for(i=0;i<store.length;i++){
			System.out.println(store[i]);
		}
	}

} Main public static void main(String[] args) throws Exception {
		// TODO ?????????????????????????????????????????????
		int[] arg =new int[10];
        int i=0;
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
            String line;
            while ((line = br.readLine()) != null) {
                String tokens = line;
                arg[i] = Integer.parseInt(tokens);
                i++;
            }
        }



		int[] store=new int[3];
		for(i=0;i<10;i++){
			int s=arg[i];
			for(int j=0;j<3;j++){
				if(s>store[j]){
					if(j==0){
						store[j+2]=store[j+1];
						store[j+1]=store[j];
						store[j]=s;
						break;
					}else if(j==1){
						store[j+1]=store[j];
						store[j]=s;
						break;
					}else{
						store[j]=s;
					}
				}
			}
		}
		for(i=0;i<store.length;i++){
			System.out.println(store[i]);
		}
	} main {
		// TODO ?????????????????????????????????????????????
		int[] arg =new int[10];
        int i=0;
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
            String line;
            while ((line = br.readLine()) != null) {
                String tokens = line;
                arg[i] = Integer.parseInt(tokens);
                i++;
            }
        }



		int[] store=new int[3];
		for(i=0;i<10;i++){
			int s=arg[i];
			for(int j=0;j<3;j++){
				if(s>store[j]){
					if(j==0){
						store[j+2]=store[j+1];
						store[j+1]=store[j];
						store[j]=s;
						break;
					}else if(j==1){
						store[j+1]=store[j];
						store[j]=s;
						break;
					}else{
						store[j]=s;
					}
				}
			}
		}
		for(i=0;i<store.length;i++){
			System.out.println(store[i]);
		}
	} int[] arg =new int[10]; arg new int[10] 10 int i=0; i 0 try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
            String line;
            while ((line = br.readLine()) != null) {
                String tokens = line;
                arg[i] = Integer.parseInt(tokens);
                i++;
            }
        } {
            String line;
            while ((line = br.readLine()) != null) {
                String tokens = line;
                arg[i] = Integer.parseInt(tokens);
                i++;
            }
        } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) new BufferedReader(new InputStreamReader(System.in)) String line; line while ((line = br.readLine()) != null) {
                String tokens = line;
                arg[i] = Integer.parseInt(tokens);
                i++;
            } (line = br.readLine()) != null (line = br.readLine()) line br.readLine() br.readLine br null {
                String tokens = line;
                arg[i] = Integer.parseInt(tokens);
                i++;
            } String tokens = line; tokens line arg[i] = Integer.parseInt(tokens) arg[i] arg i Integer.parseInt(tokens) Integer.parseInt Integer tokens i++ i int[] store=new int[3]; store new int[3] 3 for(i=0;i<10;i++){
			int s=arg[i];
			for(int j=0;j<3;j++){
				if(s>store[j]){
					if(j==0){
						store[j+2]=store[j+1];
						store[j+1]=store[j];
						store[j]=s;
						break;
					}else if(j==1){
						store[j+1]=store[j];
						store[j]=s;
						break;
					}else{
						store[j]=s;
					}
				}
			}
		} i=0; i=0 i 0 i<10 i 10 i++ i++ i {
			int s=arg[i];
			for(int j=0;j<3;j++){
				if(s>store[j]){
					if(j==0){
						store[j+2]=store[j+1];
						store[j+1]=store[j];
						store[j]=s;
						break;
					}else if(j==1){
						store[j+1]=store[j];
						store[j]=s;
						break;
					}else{
						store[j]=s;
					}
				}
			}
		} {
			int s=arg[i];
			for(int j=0;j<3;j++){
				if(s>store[j]){
					if(j==0){
						store[j+2]=store[j+1];
						store[j+1]=store[j];
						store[j]=s;
						break;
					}else if(j==1){
						store[j+1]=store[j];
						store[j]=s;
						break;
					}else{
						store[j]=s;
					}
				}
			}
		} int s=arg[i]; s arg[i] arg i for(int j=0;j<3;j++){
				if(s>store[j]){
					if(j==0){
						store[j+2]=store[j+1];
						store[j+1]=store[j];
						store[j]=s;
						break;
					}else if(j==1){
						store[j+1]=store[j];
						store[j]=s;
						break;
					}else{
						store[j]=s;
					}
				}
			} int j=0; int j=0; j 0 j<3 j 3 j++ j++ j {
				if(s>store[j]){
					if(j==0){
						store[j+2]=store[j+1];
						store[j+1]=store[j];
						store[j]=s;
						break;
					}else if(j==1){
						store[j+1]=store[j];
						store[j]=s;
						break;
					}else{
						store[j]=s;
					}
				}
			} {
				if(s>store[j]){
					if(j==0){
						store[j+2]=store[j+1];
						store[j+1]=store[j];
						store[j]=s;
						break;
					}else if(j==1){
						store[j+1]=store[j];
						store[j]=s;
						break;
					}else{
						store[j]=s;
					}
				}
			} if(s>store[j]){
					if(j==0){
						store[j+2]=store[j+1];
						store[j+1]=store[j];
						store[j]=s;
						break;
					}else if(j==1){
						store[j+1]=store[j];
						store[j]=s;
						break;
					}else{
						store[j]=s;
					}
				} s>store[j] s store[j] store j {
					if(j==0){
						store[j+2]=store[j+1];
						store[j+1]=store[j];
						store[j]=s;
						break;
					}else if(j==1){
						store[j+1]=store[j];
						store[j]=s;
						break;
					}else{
						store[j]=s;
					}
				} if(j==0){
						store[j+2]=store[j+1];
						store[j+1]=store[j];
						store[j]=s;
						break;
					}else if(j==1){
						store[j+1]=store[j];
						store[j]=s;
						break;
					}else{
						store[j]=s;
					} j==0 j 0 {
						store[j+2]=store[j+1];
						store[j+1]=store[j];
						store[j]=s;
						break;
					} store[j+2]=store[j+1] store[j+2] store j+2 j 2 store[j+1] store j+1 j 1 store[j+1]=store[j] store[j+1] store j+1 j 1 store[j] store j store[j]=s store[j] store j s break; if(j==1){
						store[j+1]=store[j];
						store[j]=s;
						break;
					}else{
						store[j]=s;
					} j==1 j 1 {
						store[j+1]=store[j];
						store[j]=s;
						break;
					} store[j+1]=store[j] store[j+1] store j+1 j 1 store[j] store j store[j]=s store[j] store j s break; {
						store[j]=s;
					} store[j]=s store[j] store j s for(i=0;i<store.length;i++){
			System.out.println(store[i]);
		} i=0; i=0 i 0 i<store.length i store.length store store.length i++ i++ i {
			System.out.println(store[i]);
		} {
			System.out.println(store[i]);
		} System.out.println(store[i]) System.out.println System.out System System.out store[i] store i String[] args args public class Main {

	public static void main(String[] args) throws Exception {
		// TODO ?????????????????????????????????????????????
		int[] arg =new int[10];
        int i=0;
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
            String line;
            while ((line = br.readLine()) != null) {
                String tokens = line;
                arg[i] = Integer.parseInt(tokens);
                i++;
            }
        }



		int[] store=new int[3];
		for(i=0;i<10;i++){
			int s=arg[i];
			for(int j=0;j<3;j++){
				if(s>store[j]){
					if(j==0){
						store[j+2]=store[j+1];
						store[j+1]=store[j];
						store[j]=s;
						break;
					}else if(j==1){
						store[j+1]=store[j];
						store[j]=s;
						break;
					}else{
						store[j]=s;
					}
				}
			}
		}
		for(i=0;i<store.length;i++){
			System.out.println(store[i]);
		}
	}

} public class Main {

	public static void main(String[] args) throws Exception {
		// TODO ?????????????????????????????????????????????
		int[] arg =new int[10];
        int i=0;
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
            String line;
            while ((line = br.readLine()) != null) {
                String tokens = line;
                arg[i] = Integer.parseInt(tokens);
                i++;
            }
        }



		int[] store=new int[3];
		for(i=0;i<10;i++){
			int s=arg[i];
			for(int j=0;j<3;j++){
				if(s>store[j]){
					if(j==0){
						store[j+2]=store[j+1];
						store[j+1]=store[j];
						store[j]=s;
						break;
					}else if(j==1){
						store[j+1]=store[j];
						store[j]=s;
						break;
					}else{
						store[j]=s;
					}
				}
			}
		}
		for(i=0;i<store.length;i++){
			System.out.println(store[i]);
		}
	}

} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws Exception {
		// TODO ?????????????????????????????????????????????
		int[] arg =new int[10];
        int i=0;
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
            String line;
            while ((line = br.readLine()) != null) {
                String tokens = line;
                arg[i] = Integer.parseInt(tokens);
                i++;
            }
        }



		int[] store=new int[3];
		for(i=0;i<10;i++){
			int s=arg[i];
			for(int j=0;j<3;j++){
				if(s>store[j]){
					if(j==0){
						store[j+2]=store[j+1];
						store[j+1]=store[j];
						store[j]=s;
						break;
					}else if(j==1){
						store[j+1]=store[j];
						store[j]=s;
						break;
					}else{
						store[j]=s;
					}
				}
			}
		}
		for(i=0;i<store.length;i++){
			System.out.println(store[i]);
		}
	}

}