import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;

class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {

		Integer top3[] = new Integer[3];
		for (int i = 0; i < 3; i++) {
			top3[i] = 0;
		}

		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		for (int x = 1; x <= 10; x++) {
			Integer h = Integer.parseInt(in.readLine());
			if (h >= 0 && h <= 10000) {
				ArrayList<Integer> tmpTop = new ArrayList<Integer>(4);
				for (int i = 0; i< 3; i++) {
					tmpTop.add(top3[i]);
				}
				tmpTop.add(h);

				Collections.sort(tmpTop);
				Collections.reverse(tmpTop);

				for (int i = 0; i< 3; i++) {
					top3[i] = tmpTop.get(i);
				}
			}
		}

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

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {

		Integer top3[] = new Integer[3];
		for (int i = 0; i < 3; i++) {
			top3[i] = 0;
		}

		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		for (int x = 1; x <= 10; x++) {
			Integer h = Integer.parseInt(in.readLine());
			if (h >= 0 && h <= 10000) {
				ArrayList<Integer> tmpTop = new ArrayList<Integer>(4);
				for (int i = 0; i< 3; i++) {
					tmpTop.add(top3[i]);
				}
				tmpTop.add(h);

				Collections.sort(tmpTop);
				Collections.reverse(tmpTop);

				for (int i = 0; i< 3; i++) {
					top3[i] = tmpTop.get(i);
				}
			}
		}

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

} Main public static void main(String[] args) throws NumberFormatException, IOException {

		Integer top3[] = new Integer[3];
		for (int i = 0; i < 3; i++) {
			top3[i] = 0;
		}

		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		for (int x = 1; x <= 10; x++) {
			Integer h = Integer.parseInt(in.readLine());
			if (h >= 0 && h <= 10000) {
				ArrayList<Integer> tmpTop = new ArrayList<Integer>(4);
				for (int i = 0; i< 3; i++) {
					tmpTop.add(top3[i]);
				}
				tmpTop.add(h);

				Collections.sort(tmpTop);
				Collections.reverse(tmpTop);

				for (int i = 0; i< 3; i++) {
					top3[i] = tmpTop.get(i);
				}
			}
		}

		for (int i = 0; i< 3; i++) {
			System.out.println(top3[i]);
		}
	} main {

		Integer top3[] = new Integer[3];
		for (int i = 0; i < 3; i++) {
			top3[i] = 0;
		}

		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		for (int x = 1; x <= 10; x++) {
			Integer h = Integer.parseInt(in.readLine());
			if (h >= 0 && h <= 10000) {
				ArrayList<Integer> tmpTop = new ArrayList<Integer>(4);
				for (int i = 0; i< 3; i++) {
					tmpTop.add(top3[i]);
				}
				tmpTop.add(h);

				Collections.sort(tmpTop);
				Collections.reverse(tmpTop);

				for (int i = 0; i< 3; i++) {
					top3[i] = tmpTop.get(i);
				}
			}
		}

		for (int i = 0; i< 3; i++) {
			System.out.println(top3[i]);
		}
	} Integer top3[] = new Integer[3]; top3 new Integer[3] 3 for (int i = 0; i < 3; i++) {
			top3[i] = 0;
		} int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
			top3[i] = 0;
		} {
			top3[i] = 0;
		} top3[i] = 0 top3[i] top3 i 0 BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) for (int x = 1; x <= 10; x++) {
			Integer h = Integer.parseInt(in.readLine());
			if (h >= 0 && h <= 10000) {
				ArrayList<Integer> tmpTop = new ArrayList<Integer>(4);
				for (int i = 0; i< 3; i++) {
					tmpTop.add(top3[i]);
				}
				tmpTop.add(h);

				Collections.sort(tmpTop);
				Collections.reverse(tmpTop);

				for (int i = 0; i< 3; i++) {
					top3[i] = tmpTop.get(i);
				}
			}
		} int x = 1; int x = 1; x 1 x <= 10 x 10 x++ x++ x {
			Integer h = Integer.parseInt(in.readLine());
			if (h >= 0 && h <= 10000) {
				ArrayList<Integer> tmpTop = new ArrayList<Integer>(4);
				for (int i = 0; i< 3; i++) {
					tmpTop.add(top3[i]);
				}
				tmpTop.add(h);

				Collections.sort(tmpTop);
				Collections.reverse(tmpTop);

				for (int i = 0; i< 3; i++) {
					top3[i] = tmpTop.get(i);
				}
			}
		} {
			Integer h = Integer.parseInt(in.readLine());
			if (h >= 0 && h <= 10000) {
				ArrayList<Integer> tmpTop = new ArrayList<Integer>(4);
				for (int i = 0; i< 3; i++) {
					tmpTop.add(top3[i]);
				}
				tmpTop.add(h);

				Collections.sort(tmpTop);
				Collections.reverse(tmpTop);

				for (int i = 0; i< 3; i++) {
					top3[i] = tmpTop.get(i);
				}
			}
		} Integer h = Integer.parseInt(in.readLine()); h Integer.parseInt(in.readLine()) Integer.parseInt Integer in.readLine() in.readLine in if (h >= 0 && h <= 10000) {
				ArrayList<Integer> tmpTop = new ArrayList<Integer>(4);
				for (int i = 0; i< 3; i++) {
					tmpTop.add(top3[i]);
				}
				tmpTop.add(h);

				Collections.sort(tmpTop);
				Collections.reverse(tmpTop);

				for (int i = 0; i< 3; i++) {
					top3[i] = tmpTop.get(i);
				}
			} h >= 0 && h <= 10000 h >= 0 h 0 h <= 10000 h 10000 {
				ArrayList<Integer> tmpTop = new ArrayList<Integer>(4);
				for (int i = 0; i< 3; i++) {
					tmpTop.add(top3[i]);
				}
				tmpTop.add(h);

				Collections.sort(tmpTop);
				Collections.reverse(tmpTop);

				for (int i = 0; i< 3; i++) {
					top3[i] = tmpTop.get(i);
				}
			} ArrayList<Integer> tmpTop = new ArrayList<Integer>(4); tmpTop new ArrayList<Integer>(4) for (int i = 0; i< 3; i++) {
					tmpTop.add(top3[i]);
				} int i = 0; int i = 0; i 0 i< 3 i 3 i++ i++ i {
					tmpTop.add(top3[i]);
				} {
					tmpTop.add(top3[i]);
				} tmpTop.add(top3[i]) tmpTop.add tmpTop top3[i] top3 i tmpTop.add(h) tmpTop.add tmpTop h Collections.sort(tmpTop) Collections.sort Collections tmpTop Collections.reverse(tmpTop) Collections.reverse Collections tmpTop for (int i = 0; i< 3; i++) {
					top3[i] = tmpTop.get(i);
				} int i = 0; int i = 0; i 0 i< 3 i 3 i++ i++ i {
					top3[i] = tmpTop.get(i);
				} {
					top3[i] = tmpTop.get(i);
				} top3[i] = tmpTop.get(i) top3[i] top3 i tmpTop.get(i) tmpTop.get tmpTop i for (int i = 0; i< 3; i++) {
			System.out.println(top3[i]);
		} int i = 0; int i = 0; i 0 i< 3 i 3 i++ i++ i {
			System.out.println(top3[i]);
		} {
			System.out.println(top3[i]);
		} System.out.println(top3[i]) System.out.println System.out System System.out top3[i] top3 i String[] args args
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;

class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {

		Integer top3[] = new Integer[3];
		for (int i = 0; i < 3; i++) {
			top3[i] = 0;
		}

		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		for (int x = 1; x <= 10; x++) {
			Integer h = Integer.parseInt(in.readLine());
			if (h >= 0 && h <= 10000) {
				ArrayList<Integer> tmpTop = new ArrayList<Integer>(4);
				for (int i = 0; i< 3; i++) {
					tmpTop.add(top3[i]);
				}
				tmpTop.add(h);

				Collections.sort(tmpTop);
				Collections.reverse(tmpTop);

				for (int i = 0; i< 3; i++) {
					top3[i] = tmpTop.get(i);
				}
			}
		}

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

}