import java.io.*;
public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		int height[] = new int[10];
		int out[] = {0,0,0}; 
		for(int i = 0; i < 10; i++){
			try{
				height[i] = Integer.parseInt(in.readLine());
//				System.out.println(height[i]);
			}catch(IOException e){}
		}
		for(int i = 0; i < height.length; i++){
			if(out[0] < height[i] ){
				out[2] = out[1];
				out[1] = out[0];
				out[0] = height[i];
			}else if(out[1] < height[i]){
				out[2] = out[1];
				out[1] = height[i];
			}else if(out[2] < height[i]){
				out[2] = height[i];
			}
		}
		//out?????°????????????
		for(int i = 0; i < out.length; i++){
			System.out.println(out[i]);
		}
	}

} import java.io.*; io.* java public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		int height[] = new int[10];
		int out[] = {0,0,0}; 
		for(int i = 0; i < 10; i++){
			try{
				height[i] = Integer.parseInt(in.readLine());
//				System.out.println(height[i]);
			}catch(IOException e){}
		}
		for(int i = 0; i < height.length; i++){
			if(out[0] < height[i] ){
				out[2] = out[1];
				out[1] = out[0];
				out[0] = height[i];
			}else if(out[1] < height[i]){
				out[2] = out[1];
				out[1] = height[i];
			}else if(out[2] < height[i]){
				out[2] = height[i];
			}
		}
		//out?????°????????????
		for(int i = 0; i < out.length; i++){
			System.out.println(out[i]);
		}
	}

} Main public static void main(String[] args) {
		// TODO Auto-generated method stub
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		int height[] = new int[10];
		int out[] = {0,0,0}; 
		for(int i = 0; i < 10; i++){
			try{
				height[i] = Integer.parseInt(in.readLine());
//				System.out.println(height[i]);
			}catch(IOException e){}
		}
		for(int i = 0; i < height.length; i++){
			if(out[0] < height[i] ){
				out[2] = out[1];
				out[1] = out[0];
				out[0] = height[i];
			}else if(out[1] < height[i]){
				out[2] = out[1];
				out[1] = height[i];
			}else if(out[2] < height[i]){
				out[2] = height[i];
			}
		}
		//out?????°????????????
		for(int i = 0; i < out.length; i++){
			System.out.println(out[i]);
		}
	} main {
		// TODO Auto-generated method stub
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		int height[] = new int[10];
		int out[] = {0,0,0}; 
		for(int i = 0; i < 10; i++){
			try{
				height[i] = Integer.parseInt(in.readLine());
//				System.out.println(height[i]);
			}catch(IOException e){}
		}
		for(int i = 0; i < height.length; i++){
			if(out[0] < height[i] ){
				out[2] = out[1];
				out[1] = out[0];
				out[0] = height[i];
			}else if(out[1] < height[i]){
				out[2] = out[1];
				out[1] = height[i];
			}else if(out[2] < height[i]){
				out[2] = height[i];
			}
		}
		//out?????°????????????
		for(int i = 0; i < out.length; i++){
			System.out.println(out[i]);
		}
	} BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) int height[] = new int[10]; height new int[10] 10 int out[] = {0,0,0}; out {0,0,0} 0 0 0 for(int i = 0; i < 10; i++){
			try{
				height[i] = Integer.parseInt(in.readLine());
//				System.out.println(height[i]);
			}catch(IOException e){}
		} int i = 0; int i = 0; i 0 i < 10 i 10 i++ i++ i {
			try{
				height[i] = Integer.parseInt(in.readLine());
//				System.out.println(height[i]);
			}catch(IOException e){}
		} {
			try{
				height[i] = Integer.parseInt(in.readLine());
//				System.out.println(height[i]);
			}catch(IOException e){}
		} try{
				height[i] = Integer.parseInt(in.readLine());
//				System.out.println(height[i]);
			}catch(IOException e){} catch(IOException e){} IOException e {} {
				height[i] = Integer.parseInt(in.readLine());
//				System.out.println(height[i]);
			} height[i] = Integer.parseInt(in.readLine()) height[i] height i Integer.parseInt(in.readLine()) Integer.parseInt Integer in.readLine() in.readLine in for(int i = 0; i < height.length; i++){
			if(out[0] < height[i] ){
				out[2] = out[1];
				out[1] = out[0];
				out[0] = height[i];
			}else if(out[1] < height[i]){
				out[2] = out[1];
				out[1] = height[i];
			}else if(out[2] < height[i]){
				out[2] = height[i];
			}
		} int i = 0; int i = 0; i 0 i < height.length i height.length height height.length i++ i++ i {
			if(out[0] < height[i] ){
				out[2] = out[1];
				out[1] = out[0];
				out[0] = height[i];
			}else if(out[1] < height[i]){
				out[2] = out[1];
				out[1] = height[i];
			}else if(out[2] < height[i]){
				out[2] = height[i];
			}
		} {
			if(out[0] < height[i] ){
				out[2] = out[1];
				out[1] = out[0];
				out[0] = height[i];
			}else if(out[1] < height[i]){
				out[2] = out[1];
				out[1] = height[i];
			}else if(out[2] < height[i]){
				out[2] = height[i];
			}
		} if(out[0] < height[i] ){
				out[2] = out[1];
				out[1] = out[0];
				out[0] = height[i];
			}else if(out[1] < height[i]){
				out[2] = out[1];
				out[1] = height[i];
			}else if(out[2] < height[i]){
				out[2] = height[i];
			} out[0] < height[i] out[0] out 0 height[i] height i {
				out[2] = out[1];
				out[1] = out[0];
				out[0] = height[i];
			} out[2] = out[1] out[2] out 2 out[1] out 1 out[1] = out[0] out[1] out 1 out[0] out 0 out[0] = height[i] out[0] out 0 height[i] height i if(out[1] < height[i]){
				out[2] = out[1];
				out[1] = height[i];
			}else if(out[2] < height[i]){
				out[2] = height[i];
			} out[1] < height[i] out[1] out 1 height[i] height i {
				out[2] = out[1];
				out[1] = height[i];
			} out[2] = out[1] out[2] out 2 out[1] out 1 out[1] = height[i] out[1] out 1 height[i] height i if(out[2] < height[i]){
				out[2] = height[i];
			} out[2] < height[i] out[2] out 2 height[i] height i {
				out[2] = height[i];
			} out[2] = height[i] out[2] out 2 height[i] height i for(int i = 0; i < out.length; i++){
			System.out.println(out[i]);
		} int i = 0; int i = 0; i 0 i < out.length i out.length out out.length i++ i++ i {
			System.out.println(out[i]);
		} {
			System.out.println(out[i]);
		} System.out.println(out[i]) System.out.println System.out System System.out out[i] out i String[] args args public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		int height[] = new int[10];
		int out[] = {0,0,0}; 
		for(int i = 0; i < 10; i++){
			try{
				height[i] = Integer.parseInt(in.readLine());
//				System.out.println(height[i]);
			}catch(IOException e){}
		}
		for(int i = 0; i < height.length; i++){
			if(out[0] < height[i] ){
				out[2] = out[1];
				out[1] = out[0];
				out[0] = height[i];
			}else if(out[1] < height[i]){
				out[2] = out[1];
				out[1] = height[i];
			}else if(out[2] < height[i]){
				out[2] = height[i];
			}
		}
		//out?????°????????????
		for(int i = 0; i < out.length; i++){
			System.out.println(out[i]);
		}
	}

} public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		int height[] = new int[10];
		int out[] = {0,0,0}; 
		for(int i = 0; i < 10; i++){
			try{
				height[i] = Integer.parseInt(in.readLine());
//				System.out.println(height[i]);
			}catch(IOException e){}
		}
		for(int i = 0; i < height.length; i++){
			if(out[0] < height[i] ){
				out[2] = out[1];
				out[1] = out[0];
				out[0] = height[i];
			}else if(out[1] < height[i]){
				out[2] = out[1];
				out[1] = height[i];
			}else if(out[2] < height[i]){
				out[2] = height[i];
			}
		}
		//out?????°????????????
		for(int i = 0; i < out.length; i++){
			System.out.println(out[i]);
		}
	}

} Main
import java.io.*;
public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		int height[] = new int[10];
		int out[] = {0,0,0}; 
		for(int i = 0; i < 10; i++){
			try{
				height[i] = Integer.parseInt(in.readLine());
//				System.out.println(height[i]);
			}catch(IOException e){}
		}
		for(int i = 0; i < height.length; i++){
			if(out[0] < height[i] ){
				out[2] = out[1];
				out[1] = out[0];
				out[0] = height[i];
			}else if(out[1] < height[i]){
				out[2] = out[1];
				out[1] = height[i];
			}else if(out[2] < height[i]){
				out[2] = height[i];
			}
		}
		//out?????°????????????
		for(int i = 0; i < out.length; i++){
			System.out.println(out[i]);
		}
	}

}