public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		java.util.Scanner sc = new java.util.Scanner(System.in);

		int first, second, third, temp;

		first = sc.nextInt(); // i=0

		temp = sc.nextInt(); // i=1
		if (temp > first) {
			second = first;
			first = temp;
		} else {
			second = temp;
		}

		temp = sc.nextInt(); // i=2
		if (temp > first) {
			third = second;
			second = first;
			first = temp;
		} else if (temp > second) {
			third = second;
			second = temp;
		} else {
			third = temp;
		}

		for (int i=3; i < 10; i++) {
			temp = sc.nextInt();
			if (temp > first) {
				third = second;
				second = first;
				first = temp;
			} else if (temp > second) {
				third = second;
				second = temp;
			} else if (temp > third) {
				third = temp;
			}
		}

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

} public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		java.util.Scanner sc = new java.util.Scanner(System.in);

		int first, second, third, temp;

		first = sc.nextInt(); // i=0

		temp = sc.nextInt(); // i=1
		if (temp > first) {
			second = first;
			first = temp;
		} else {
			second = temp;
		}

		temp = sc.nextInt(); // i=2
		if (temp > first) {
			third = second;
			second = first;
			first = temp;
		} else if (temp > second) {
			third = second;
			second = temp;
		} else {
			third = temp;
		}

		for (int i=3; i < 10; i++) {
			temp = sc.nextInt();
			if (temp > first) {
				third = second;
				second = first;
				first = temp;
			} else if (temp > second) {
				third = second;
				second = temp;
			} else if (temp > third) {
				third = temp;
			}
		}

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

} Main public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		java.util.Scanner sc = new java.util.Scanner(System.in);

		int first, second, third, temp;

		first = sc.nextInt(); // i=0

		temp = sc.nextInt(); // i=1
		if (temp > first) {
			second = first;
			first = temp;
		} else {
			second = temp;
		}

		temp = sc.nextInt(); // i=2
		if (temp > first) {
			third = second;
			second = first;
			first = temp;
		} else if (temp > second) {
			third = second;
			second = temp;
		} else {
			third = temp;
		}

		for (int i=3; i < 10; i++) {
			temp = sc.nextInt();
			if (temp > first) {
				third = second;
				second = first;
				first = temp;
			} else if (temp > second) {
				third = second;
				second = temp;
			} else if (temp > third) {
				third = temp;
			}
		}

		System.out.println(first);
		System.out.println(second);
		System.out.println(third);
	} main {
		// TODO ?????????????????????????????????????????????
		java.util.Scanner sc = new java.util.Scanner(System.in);

		int first, second, third, temp;

		first = sc.nextInt(); // i=0

		temp = sc.nextInt(); // i=1
		if (temp > first) {
			second = first;
			first = temp;
		} else {
			second = temp;
		}

		temp = sc.nextInt(); // i=2
		if (temp > first) {
			third = second;
			second = first;
			first = temp;
		} else if (temp > second) {
			third = second;
			second = temp;
		} else {
			third = temp;
		}

		for (int i=3; i < 10; i++) {
			temp = sc.nextInt();
			if (temp > first) {
				third = second;
				second = first;
				first = temp;
			} else if (temp > second) {
				third = second;
				second = temp;
			} else if (temp > third) {
				third = temp;
			}
		}

		System.out.println(first);
		System.out.println(second);
		System.out.println(third);
	} java.util.Scanner sc = new java.util.Scanner(System.in); sc new java.util.Scanner(System.in) int first first second second third third temp; temp first = sc.nextInt() first sc.nextInt() sc.nextInt sc temp = sc.nextInt() temp sc.nextInt() sc.nextInt sc if (temp > first) {
			second = first;
			first = temp;
		} else {
			second = temp;
		} temp > first temp first {
			second = first;
			first = temp;
		} second = first second first first = temp first temp {
			second = temp;
		} second = temp second temp temp = sc.nextInt() temp sc.nextInt() sc.nextInt sc if (temp > first) {
			third = second;
			second = first;
			first = temp;
		} else if (temp > second) {
			third = second;
			second = temp;
		} else {
			third = temp;
		} temp > first temp first {
			third = second;
			second = first;
			first = temp;
		} third = second third second second = first second first first = temp first temp if (temp > second) {
			third = second;
			second = temp;
		} else {
			third = temp;
		} temp > second temp second {
			third = second;
			second = temp;
		} third = second third second second = temp second temp {
			third = temp;
		} third = temp third temp for (int i=3; i < 10; i++) {
			temp = sc.nextInt();
			if (temp > first) {
				third = second;
				second = first;
				first = temp;
			} else if (temp > second) {
				third = second;
				second = temp;
			} else if (temp > third) {
				third = temp;
			}
		} int i=3; int i=3; i 3 i < 10 i 10 i++ i++ i {
			temp = sc.nextInt();
			if (temp > first) {
				third = second;
				second = first;
				first = temp;
			} else if (temp > second) {
				third = second;
				second = temp;
			} else if (temp > third) {
				third = temp;
			}
		} {
			temp = sc.nextInt();
			if (temp > first) {
				third = second;
				second = first;
				first = temp;
			} else if (temp > second) {
				third = second;
				second = temp;
			} else if (temp > third) {
				third = temp;
			}
		} temp = sc.nextInt() temp sc.nextInt() sc.nextInt sc if (temp > first) {
				third = second;
				second = first;
				first = temp;
			} else if (temp > second) {
				third = second;
				second = temp;
			} else if (temp > third) {
				third = temp;
			} temp > first temp first {
				third = second;
				second = first;
				first = temp;
			} third = second third second second = first second first first = temp first temp if (temp > second) {
				third = second;
				second = temp;
			} else if (temp > third) {
				third = temp;
			} temp > second temp second {
				third = second;
				second = temp;
			} third = second third second second = temp second temp if (temp > third) {
				third = temp;
			} temp > third temp third {
				third = temp;
			} third = temp third temp System.out.println(first) System.out.println System.out System System.out first System.out.println(second) System.out.println System.out System System.out second System.out.println(third) System.out.println System.out System System.out third String[] args args public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		java.util.Scanner sc = new java.util.Scanner(System.in);

		int first, second, third, temp;

		first = sc.nextInt(); // i=0

		temp = sc.nextInt(); // i=1
		if (temp > first) {
			second = first;
			first = temp;
		} else {
			second = temp;
		}

		temp = sc.nextInt(); // i=2
		if (temp > first) {
			third = second;
			second = first;
			first = temp;
		} else if (temp > second) {
			third = second;
			second = temp;
		} else {
			third = temp;
		}

		for (int i=3; i < 10; i++) {
			temp = sc.nextInt();
			if (temp > first) {
				third = second;
				second = first;
				first = temp;
			} else if (temp > second) {
				third = second;
				second = temp;
			} else if (temp > third) {
				third = temp;
			}
		}

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

} public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		java.util.Scanner sc = new java.util.Scanner(System.in);

		int first, second, third, temp;

		first = sc.nextInt(); // i=0

		temp = sc.nextInt(); // i=1
		if (temp > first) {
			second = first;
			first = temp;
		} else {
			second = temp;
		}

		temp = sc.nextInt(); // i=2
		if (temp > first) {
			third = second;
			second = first;
			first = temp;
		} else if (temp > second) {
			third = second;
			second = temp;
		} else {
			third = temp;
		}

		for (int i=3; i < 10; i++) {
			temp = sc.nextInt();
			if (temp > first) {
				third = second;
				second = first;
				first = temp;
			} else if (temp > second) {
				third = second;
				second = temp;
			} else if (temp > third) {
				third = temp;
			}
		}

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

} Main
public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		java.util.Scanner sc = new java.util.Scanner(System.in);

		int first, second, third, temp;

		first = sc.nextInt(); // i=0

		temp = sc.nextInt(); // i=1
		if (temp > first) {
			second = first;
			first = temp;
		} else {
			second = temp;
		}

		temp = sc.nextInt(); // i=2
		if (temp > first) {
			third = second;
			second = first;
			first = temp;
		} else if (temp > second) {
			third = second;
			second = temp;
		} else {
			third = temp;
		}

		for (int i=3; i < 10; i++) {
			temp = sc.nextInt();
			if (temp > first) {
				third = second;
				second = first;
				first = temp;
			} else if (temp > second) {
				third = second;
				second = temp;
			} else if (temp > third) {
				third = temp;
			}
		}

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

}