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

class Main {
	static List<Integer> list = new ArrayList<Integer>();

	public static void main(String[] args) {
		Collections.addAll(list, 0,0,0);
		Scanner scan = new Scanner(System.in);
		for (int i = 0; i < 10; i++) {
			int sc = scan.nextInt();
			max(sc);
		}
		for(int i=0;i<list.size();i++){
			System.out.println(list.get(i));
		}
	}

	public static void max(int sc) {
		for(int j=0;j<list.size();j++){
			if(list.get(j)<=sc){
				list.remove(2);
				list.add(j, sc);
				break;
			}
		}
	}
} 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 class Main {
	static List<Integer> list = new ArrayList<Integer>();

	public static void main(String[] args) {
		Collections.addAll(list, 0,0,0);
		Scanner scan = new Scanner(System.in);
		for (int i = 0; i < 10; i++) {
			int sc = scan.nextInt();
			max(sc);
		}
		for(int i=0;i<list.size();i++){
			System.out.println(list.get(i));
		}
	}

	public static void max(int sc) {
		for(int j=0;j<list.size();j++){
			if(list.get(j)<=sc){
				list.remove(2);
				list.add(j, sc);
				break;
			}
		}
	}
} Main static List<Integer> list = new ArrayList<Integer>(); list new ArrayList<Integer>() public static void main(String[] args) {
		Collections.addAll(list, 0,0,0);
		Scanner scan = new Scanner(System.in);
		for (int i = 0; i < 10; i++) {
			int sc = scan.nextInt();
			max(sc);
		}
		for(int i=0;i<list.size();i++){
			System.out.println(list.get(i));
		}
	} main {
		Collections.addAll(list, 0,0,0);
		Scanner scan = new Scanner(System.in);
		for (int i = 0; i < 10; i++) {
			int sc = scan.nextInt();
			max(sc);
		}
		for(int i=0;i<list.size();i++){
			System.out.println(list.get(i));
		}
	} Collections.addAll(list, 0,0,0) Collections.addAll Collections list 0 0 0 Scanner scan = new Scanner(System.in); scan new Scanner(System.in) for (int i = 0; i < 10; i++) {
			int sc = scan.nextInt();
			max(sc);
		} int i = 0; int i = 0; i 0 i < 10 i 10 i++ i++ i {
			int sc = scan.nextInt();
			max(sc);
		} {
			int sc = scan.nextInt();
			max(sc);
		} int sc = scan.nextInt(); sc scan.nextInt() scan.nextInt scan max(sc) max sc for(int i=0;i<list.size();i++){
			System.out.println(list.get(i));
		} int i=0; int i=0; i 0 i<list.size() i list.size() list.size list i++ i++ i {
			System.out.println(list.get(i));
		} {
			System.out.println(list.get(i));
		} System.out.println(list.get(i)) System.out.println System.out System System.out list.get(i) list.get list i String[] args args public static void max(int sc) {
		for(int j=0;j<list.size();j++){
			if(list.get(j)<=sc){
				list.remove(2);
				list.add(j, sc);
				break;
			}
		}
	} max {
		for(int j=0;j<list.size();j++){
			if(list.get(j)<=sc){
				list.remove(2);
				list.add(j, sc);
				break;
			}
		}
	} for(int j=0;j<list.size();j++){
			if(list.get(j)<=sc){
				list.remove(2);
				list.add(j, sc);
				break;
			}
		} int j=0; int j=0; j 0 j<list.size() j list.size() list.size list j++ j++ j {
			if(list.get(j)<=sc){
				list.remove(2);
				list.add(j, sc);
				break;
			}
		} {
			if(list.get(j)<=sc){
				list.remove(2);
				list.add(j, sc);
				break;
			}
		} if(list.get(j)<=sc){
				list.remove(2);
				list.add(j, sc);
				break;
			} list.get(j)<=sc list.get(j) list.get list j sc {
				list.remove(2);
				list.add(j, sc);
				break;
			} list.remove(2) list.remove list 2 list.add(j, sc) list.add list j sc break; int sc sc
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

class Main {
	static List<Integer> list = new ArrayList<Integer>();

	public static void main(String[] args) {
		Collections.addAll(list, 0,0,0);
		Scanner scan = new Scanner(System.in);
		for (int i = 0; i < 10; i++) {
			int sc = scan.nextInt();
			max(sc);
		}
		for(int i=0;i<list.size();i++){
			System.out.println(list.get(i));
		}
	}

	public static void max(int sc) {
		for(int j=0;j<list.size();j++){
			if(list.get(j)<=sc){
				list.remove(2);
				list.add(j, sc);
				break;
			}
		}
	}
}