import java.util.Scanner;

public class Main {
  public static void main(String[] args){
	Scanner s = new Scanner(System.in);
	
	int a[] = new int[10];
	int top = 0;
	int second =0;
	int thard = 0;
	
	//???????????????
	for(int i = 0;i < 10;i++){
		a[i] = s.nextInt();
		if(i > 0){
			if(top <= a[i]){
				thard  = second;
				second = top;//?????????
				top = a[i];
			}else if(second <= a[i] && top >= a[i]){
				thard  = second;
				second = a[i];
			}else if(thard <= a[i] && second >= a[i]){
				thard = a[i];
			}
		}else{
			top = a[i];
		}
	}
	System.out.println(top);
	System.out.println(second);
	System.out.println(thard);
  }
} import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args){
	Scanner s = new Scanner(System.in);
	
	int a[] = new int[10];
	int top = 0;
	int second =0;
	int thard = 0;
	
	//???????????????
	for(int i = 0;i < 10;i++){
		a[i] = s.nextInt();
		if(i > 0){
			if(top <= a[i]){
				thard  = second;
				second = top;//?????????
				top = a[i];
			}else if(second <= a[i] && top >= a[i]){
				thard  = second;
				second = a[i];
			}else if(thard <= a[i] && second >= a[i]){
				thard = a[i];
			}
		}else{
			top = a[i];
		}
	}
	System.out.println(top);
	System.out.println(second);
	System.out.println(thard);
  }
} Main public static void main(String[] args){
	Scanner s = new Scanner(System.in);
	
	int a[] = new int[10];
	int top = 0;
	int second =0;
	int thard = 0;
	
	//???????????????
	for(int i = 0;i < 10;i++){
		a[i] = s.nextInt();
		if(i > 0){
			if(top <= a[i]){
				thard  = second;
				second = top;//?????????
				top = a[i];
			}else if(second <= a[i] && top >= a[i]){
				thard  = second;
				second = a[i];
			}else if(thard <= a[i] && second >= a[i]){
				thard = a[i];
			}
		}else{
			top = a[i];
		}
	}
	System.out.println(top);
	System.out.println(second);
	System.out.println(thard);
  } main {
	Scanner s = new Scanner(System.in);
	
	int a[] = new int[10];
	int top = 0;
	int second =0;
	int thard = 0;
	
	//???????????????
	for(int i = 0;i < 10;i++){
		a[i] = s.nextInt();
		if(i > 0){
			if(top <= a[i]){
				thard  = second;
				second = top;//?????????
				top = a[i];
			}else if(second <= a[i] && top >= a[i]){
				thard  = second;
				second = a[i];
			}else if(thard <= a[i] && second >= a[i]){
				thard = a[i];
			}
		}else{
			top = a[i];
		}
	}
	System.out.println(top);
	System.out.println(second);
	System.out.println(thard);
  } Scanner s = new Scanner(System.in); s new Scanner(System.in) int a[] = new int[10]; a new int[10] 10 int top = 0; top 0 int second =0; second 0 int thard = 0; thard 0 for(int i = 0;i < 10;i++){
		a[i] = s.nextInt();
		if(i > 0){
			if(top <= a[i]){
				thard  = second;
				second = top;//?????????
				top = a[i];
			}else if(second <= a[i] && top >= a[i]){
				thard  = second;
				second = a[i];
			}else if(thard <= a[i] && second >= a[i]){
				thard = a[i];
			}
		}else{
			top = a[i];
		}
	} int i = 0; int i = 0; i 0 i < 10 i 10 i++ i++ i {
		a[i] = s.nextInt();
		if(i > 0){
			if(top <= a[i]){
				thard  = second;
				second = top;//?????????
				top = a[i];
			}else if(second <= a[i] && top >= a[i]){
				thard  = second;
				second = a[i];
			}else if(thard <= a[i] && second >= a[i]){
				thard = a[i];
			}
		}else{
			top = a[i];
		}
	} {
		a[i] = s.nextInt();
		if(i > 0){
			if(top <= a[i]){
				thard  = second;
				second = top;//?????????
				top = a[i];
			}else if(second <= a[i] && top >= a[i]){
				thard  = second;
				second = a[i];
			}else if(thard <= a[i] && second >= a[i]){
				thard = a[i];
			}
		}else{
			top = a[i];
		}
	} a[i] = s.nextInt() a[i] a i s.nextInt() s.nextInt s if(i > 0){
			if(top <= a[i]){
				thard  = second;
				second = top;//?????????
				top = a[i];
			}else if(second <= a[i] && top >= a[i]){
				thard  = second;
				second = a[i];
			}else if(thard <= a[i] && second >= a[i]){
				thard = a[i];
			}
		}else{
			top = a[i];
		} i > 0 i 0 {
			if(top <= a[i]){
				thard  = second;
				second = top;//?????????
				top = a[i];
			}else if(second <= a[i] && top >= a[i]){
				thard  = second;
				second = a[i];
			}else if(thard <= a[i] && second >= a[i]){
				thard = a[i];
			}
		} if(top <= a[i]){
				thard  = second;
				second = top;//?????????
				top = a[i];
			}else if(second <= a[i] && top >= a[i]){
				thard  = second;
				second = a[i];
			}else if(thard <= a[i] && second >= a[i]){
				thard = a[i];
			} top <= a[i] top a[i] a i {
				thard  = second;
				second = top;//?????????
				top = a[i];
			} thard  = second thard second second = top second top top = a[i] top a[i] a i if(second <= a[i] && top >= a[i]){
				thard  = second;
				second = a[i];
			}else if(thard <= a[i] && second >= a[i]){
				thard = a[i];
			} second <= a[i] && top >= a[i] second <= a[i] second a[i] a i top >= a[i] top a[i] a i {
				thard  = second;
				second = a[i];
			} thard  = second thard second second = a[i] second a[i] a i if(thard <= a[i] && second >= a[i]){
				thard = a[i];
			} thard <= a[i] && second >= a[i] thard <= a[i] thard a[i] a i second >= a[i] second a[i] a i {
				thard = a[i];
			} thard = a[i] thard a[i] a i {
			top = a[i];
		} top = a[i] top a[i] a i System.out.println(top) System.out.println System.out System System.out top System.out.println(second) System.out.println System.out System System.out second System.out.println(thard) System.out.println System.out System System.out thard String[] args args public class Main {
  public static void main(String[] args){
	Scanner s = new Scanner(System.in);
	
	int a[] = new int[10];
	int top = 0;
	int second =0;
	int thard = 0;
	
	//???????????????
	for(int i = 0;i < 10;i++){
		a[i] = s.nextInt();
		if(i > 0){
			if(top <= a[i]){
				thard  = second;
				second = top;//?????????
				top = a[i];
			}else if(second <= a[i] && top >= a[i]){
				thard  = second;
				second = a[i];
			}else if(thard <= a[i] && second >= a[i]){
				thard = a[i];
			}
		}else{
			top = a[i];
		}
	}
	System.out.println(top);
	System.out.println(second);
	System.out.println(thard);
  }
} public class Main {
  public static void main(String[] args){
	Scanner s = new Scanner(System.in);
	
	int a[] = new int[10];
	int top = 0;
	int second =0;
	int thard = 0;
	
	//???????????????
	for(int i = 0;i < 10;i++){
		a[i] = s.nextInt();
		if(i > 0){
			if(top <= a[i]){
				thard  = second;
				second = top;//?????????
				top = a[i];
			}else if(second <= a[i] && top >= a[i]){
				thard  = second;
				second = a[i];
			}else if(thard <= a[i] && second >= a[i]){
				thard = a[i];
			}
		}else{
			top = a[i];
		}
	}
	System.out.println(top);
	System.out.println(second);
	System.out.println(thard);
  }
} Main
import java.util.Scanner;

public class Main {
  public static void main(String[] args){
	Scanner s = new Scanner(System.in);
	
	int a[] = new int[10];
	int top = 0;
	int second =0;
	int thard = 0;
	
	//???????????????
	for(int i = 0;i < 10;i++){
		a[i] = s.nextInt();
		if(i > 0){
			if(top <= a[i]){
				thard  = second;
				second = top;//?????????
				top = a[i];
			}else if(second <= a[i] && top >= a[i]){
				thard  = second;
				second = a[i];
			}else if(thard <= a[i] && second >= a[i]){
				thard = a[i];
			}
		}else{
			top = a[i];
		}
	}
	System.out.println(top);
	System.out.println(second);
	System.out.println(thard);
  }
}