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

public class Main {
	public static void main(String[] args) throws IOException {
		int[] data = new int[10];
		final String BR = System.getProperty("line.separator");
		int first = 0, second = 0, third = 0;
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		for (int i = 0; i < 10; i++) {
			data[i] = Integer.parseInt(in.readLine());
		}
		for (int datum : data) {
			int temp1 = 0, temp2 = 0;
			for (int j = 1; j <= 3; j++) {
				if (first < datum) {
					temp1 = first;
					temp2 = second;
					first = datum;
					second = temp1;
					third = temp2;
					break;
				}
				if (second < datum) {
					temp2 = second;
					second = datum;
					third = temp2;
					break;
				}
				if (third < datum) {
					third = datum;
				}
			}
		}

		System.out.println(first + BR + second + BR + third);
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
	public static void main(String[] args) throws IOException {
		int[] data = new int[10];
		final String BR = System.getProperty("line.separator");
		int first = 0, second = 0, third = 0;
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		for (int i = 0; i < 10; i++) {
			data[i] = Integer.parseInt(in.readLine());
		}
		for (int datum : data) {
			int temp1 = 0, temp2 = 0;
			for (int j = 1; j <= 3; j++) {
				if (first < datum) {
					temp1 = first;
					temp2 = second;
					first = datum;
					second = temp1;
					third = temp2;
					break;
				}
				if (second < datum) {
					temp2 = second;
					second = datum;
					third = temp2;
					break;
				}
				if (third < datum) {
					third = datum;
				}
			}
		}

		System.out.println(first + BR + second + BR + third);
	}
} Main public static void main(String[] args) throws IOException {
		int[] data = new int[10];
		final String BR = System.getProperty("line.separator");
		int first = 0, second = 0, third = 0;
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		for (int i = 0; i < 10; i++) {
			data[i] = Integer.parseInt(in.readLine());
		}
		for (int datum : data) {
			int temp1 = 0, temp2 = 0;
			for (int j = 1; j <= 3; j++) {
				if (first < datum) {
					temp1 = first;
					temp2 = second;
					first = datum;
					second = temp1;
					third = temp2;
					break;
				}
				if (second < datum) {
					temp2 = second;
					second = datum;
					third = temp2;
					break;
				}
				if (third < datum) {
					third = datum;
				}
			}
		}

		System.out.println(first + BR + second + BR + third);
	} main {
		int[] data = new int[10];
		final String BR = System.getProperty("line.separator");
		int first = 0, second = 0, third = 0;
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		for (int i = 0; i < 10; i++) {
			data[i] = Integer.parseInt(in.readLine());
		}
		for (int datum : data) {
			int temp1 = 0, temp2 = 0;
			for (int j = 1; j <= 3; j++) {
				if (first < datum) {
					temp1 = first;
					temp2 = second;
					first = datum;
					second = temp1;
					third = temp2;
					break;
				}
				if (second < datum) {
					temp2 = second;
					second = datum;
					third = temp2;
					break;
				}
				if (third < datum) {
					third = datum;
				}
			}
		}

		System.out.println(first + BR + second + BR + third);
	} int[] data = new int[10]; data new int[10] 10 final String BR = System.getProperty("line.separator"); BR System.getProperty("line.separator") System.getProperty System "line.separator" int first = 0 first 0 second = 0 second 0 third = 0; third 0 BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) for (int i = 0; i < 10; i++) {
			data[i] = Integer.parseInt(in.readLine());
		} int i = 0; int i = 0; i 0 i < 10 i 10 i++ i++ i {
			data[i] = Integer.parseInt(in.readLine());
		} {
			data[i] = Integer.parseInt(in.readLine());
		} data[i] = Integer.parseInt(in.readLine()) data[i] data i Integer.parseInt(in.readLine()) Integer.parseInt Integer in.readLine() in.readLine in for (int datum : data) {
			int temp1 = 0, temp2 = 0;
			for (int j = 1; j <= 3; j++) {
				if (first < datum) {
					temp1 = first;
					temp2 = second;
					first = datum;
					second = temp1;
					third = temp2;
					break;
				}
				if (second < datum) {
					temp2 = second;
					second = datum;
					third = temp2;
					break;
				}
				if (third < datum) {
					third = datum;
				}
			}
		} int datum data {
			int temp1 = 0, temp2 = 0;
			for (int j = 1; j <= 3; j++) {
				if (first < datum) {
					temp1 = first;
					temp2 = second;
					first = datum;
					second = temp1;
					third = temp2;
					break;
				}
				if (second < datum) {
					temp2 = second;
					second = datum;
					third = temp2;
					break;
				}
				if (third < datum) {
					third = datum;
				}
			}
		} {
			int temp1 = 0, temp2 = 0;
			for (int j = 1; j <= 3; j++) {
				if (first < datum) {
					temp1 = first;
					temp2 = second;
					first = datum;
					second = temp1;
					third = temp2;
					break;
				}
				if (second < datum) {
					temp2 = second;
					second = datum;
					third = temp2;
					break;
				}
				if (third < datum) {
					third = datum;
				}
			}
		} int temp1 = 0 temp1 0 temp2 = 0; temp2 0 for (int j = 1; j <= 3; j++) {
				if (first < datum) {
					temp1 = first;
					temp2 = second;
					first = datum;
					second = temp1;
					third = temp2;
					break;
				}
				if (second < datum) {
					temp2 = second;
					second = datum;
					third = temp2;
					break;
				}
				if (third < datum) {
					third = datum;
				}
			} int j = 1; int j = 1; j 1 j <= 3 j 3 j++ j++ j {
				if (first < datum) {
					temp1 = first;
					temp2 = second;
					first = datum;
					second = temp1;
					third = temp2;
					break;
				}
				if (second < datum) {
					temp2 = second;
					second = datum;
					third = temp2;
					break;
				}
				if (third < datum) {
					third = datum;
				}
			} {
				if (first < datum) {
					temp1 = first;
					temp2 = second;
					first = datum;
					second = temp1;
					third = temp2;
					break;
				}
				if (second < datum) {
					temp2 = second;
					second = datum;
					third = temp2;
					break;
				}
				if (third < datum) {
					third = datum;
				}
			} if (first < datum) {
					temp1 = first;
					temp2 = second;
					first = datum;
					second = temp1;
					third = temp2;
					break;
				} first < datum first datum {
					temp1 = first;
					temp2 = second;
					first = datum;
					second = temp1;
					third = temp2;
					break;
				} temp1 = first temp1 first temp2 = second temp2 second first = datum first datum second = temp1 second temp1 third = temp2 third temp2 break; if (second < datum) {
					temp2 = second;
					second = datum;
					third = temp2;
					break;
				} second < datum second datum {
					temp2 = second;
					second = datum;
					third = temp2;
					break;
				} temp2 = second temp2 second second = datum second datum third = temp2 third temp2 break; if (third < datum) {
					third = datum;
				} third < datum third datum {
					third = datum;
				} third = datum third datum System.out.println(first + BR + second + BR + third) System.out.println System.out System System.out first + BR + second + BR + third BR second first + BR + second + BR + third first BR second BR third String[] args args public class Main {
	public static void main(String[] args) throws IOException {
		int[] data = new int[10];
		final String BR = System.getProperty("line.separator");
		int first = 0, second = 0, third = 0;
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		for (int i = 0; i < 10; i++) {
			data[i] = Integer.parseInt(in.readLine());
		}
		for (int datum : data) {
			int temp1 = 0, temp2 = 0;
			for (int j = 1; j <= 3; j++) {
				if (first < datum) {
					temp1 = first;
					temp2 = second;
					first = datum;
					second = temp1;
					third = temp2;
					break;
				}
				if (second < datum) {
					temp2 = second;
					second = datum;
					third = temp2;
					break;
				}
				if (third < datum) {
					third = datum;
				}
			}
		}

		System.out.println(first + BR + second + BR + third);
	}
} public class Main {
	public static void main(String[] args) throws IOException {
		int[] data = new int[10];
		final String BR = System.getProperty("line.separator");
		int first = 0, second = 0, third = 0;
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		for (int i = 0; i < 10; i++) {
			data[i] = Integer.parseInt(in.readLine());
		}
		for (int datum : data) {
			int temp1 = 0, temp2 = 0;
			for (int j = 1; j <= 3; j++) {
				if (first < datum) {
					temp1 = first;
					temp2 = second;
					first = datum;
					second = temp1;
					third = temp2;
					break;
				}
				if (second < datum) {
					temp2 = second;
					second = datum;
					third = temp2;
					break;
				}
				if (third < datum) {
					third = datum;
				}
			}
		}

		System.out.println(first + BR + second + BR + third);
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) throws IOException {
		int[] data = new int[10];
		final String BR = System.getProperty("line.separator");
		int first = 0, second = 0, third = 0;
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		for (int i = 0; i < 10; i++) {
			data[i] = Integer.parseInt(in.readLine());
		}
		for (int datum : data) {
			int temp1 = 0, temp2 = 0;
			for (int j = 1; j <= 3; j++) {
				if (first < datum) {
					temp1 = first;
					temp2 = second;
					first = datum;
					second = temp1;
					third = temp2;
					break;
				}
				if (second < datum) {
					temp2 = second;
					second = datum;
					third = temp2;
					break;
				}
				if (third < datum) {
					third = datum;
				}
			}
		}

		System.out.println(first + BR + second + BR + third);
	}
}