/* Volume1 */
import java.io.*;

class Main
{
  public static void main(String[] args)
  {
    try{
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      StringBuilder sb = new StringBuilder();
      int h1 = 0,h2 = 0,h3 = 0;

      for(int i = 0; i < 10; i++){
        int height = Integer.parseInt(br.readLine());
        if(h1 < height){
          h3 = h2;
          h2 = h1;
          h1 = height;
        }else if(h2 < height){
          h3 = h2;
          h2 = height;
        }else if(h3 < height){
          h3 = height;
        }
      }

      sb.append(h1).append("\n");
      sb.append(h2).append("\n");
      sb.append(h3).append("\n");

      System.out.print(sb);
    }catch(Exception e){
      System.out.println(e);
    }
  }
} import java.io.*; io.* java class Main
{
  public static void main(String[] args)
  {
    try{
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      StringBuilder sb = new StringBuilder();
      int h1 = 0,h2 = 0,h3 = 0;

      for(int i = 0; i < 10; i++){
        int height = Integer.parseInt(br.readLine());
        if(h1 < height){
          h3 = h2;
          h2 = h1;
          h1 = height;
        }else if(h2 < height){
          h3 = h2;
          h2 = height;
        }else if(h3 < height){
          h3 = height;
        }
      }

      sb.append(h1).append("\n");
      sb.append(h2).append("\n");
      sb.append(h3).append("\n");

      System.out.print(sb);
    }catch(Exception e){
      System.out.println(e);
    }
  }
} Main public static void main(String[] args)
  {
    try{
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      StringBuilder sb = new StringBuilder();
      int h1 = 0,h2 = 0,h3 = 0;

      for(int i = 0; i < 10; i++){
        int height = Integer.parseInt(br.readLine());
        if(h1 < height){
          h3 = h2;
          h2 = h1;
          h1 = height;
        }else if(h2 < height){
          h3 = h2;
          h2 = height;
        }else if(h3 < height){
          h3 = height;
        }
      }

      sb.append(h1).append("\n");
      sb.append(h2).append("\n");
      sb.append(h3).append("\n");

      System.out.print(sb);
    }catch(Exception e){
      System.out.println(e);
    }
  } main {
    try{
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      StringBuilder sb = new StringBuilder();
      int h1 = 0,h2 = 0,h3 = 0;

      for(int i = 0; i < 10; i++){
        int height = Integer.parseInt(br.readLine());
        if(h1 < height){
          h3 = h2;
          h2 = h1;
          h1 = height;
        }else if(h2 < height){
          h3 = h2;
          h2 = height;
        }else if(h3 < height){
          h3 = height;
        }
      }

      sb.append(h1).append("\n");
      sb.append(h2).append("\n");
      sb.append(h3).append("\n");

      System.out.print(sb);
    }catch(Exception e){
      System.out.println(e);
    }
  } try{
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      StringBuilder sb = new StringBuilder();
      int h1 = 0,h2 = 0,h3 = 0;

      for(int i = 0; i < 10; i++){
        int height = Integer.parseInt(br.readLine());
        if(h1 < height){
          h3 = h2;
          h2 = h1;
          h1 = height;
        }else if(h2 < height){
          h3 = h2;
          h2 = height;
        }else if(h3 < height){
          h3 = height;
        }
      }

      sb.append(h1).append("\n");
      sb.append(h2).append("\n");
      sb.append(h3).append("\n");

      System.out.print(sb);
    }catch(Exception e){
      System.out.println(e);
    } catch(Exception e){
      System.out.println(e);
    } Exception e {
      System.out.println(e);
    } System.out.println(e) System.out.println System.out System System.out e {
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      StringBuilder sb = new StringBuilder();
      int h1 = 0,h2 = 0,h3 = 0;

      for(int i = 0; i < 10; i++){
        int height = Integer.parseInt(br.readLine());
        if(h1 < height){
          h3 = h2;
          h2 = h1;
          h1 = height;
        }else if(h2 < height){
          h3 = h2;
          h2 = height;
        }else if(h3 < height){
          h3 = height;
        }
      }

      sb.append(h1).append("\n");
      sb.append(h2).append("\n");
      sb.append(h3).append("\n");

      System.out.print(sb);
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringBuilder sb = new StringBuilder(); sb new StringBuilder() int h1 = 0 h1 0 h2 = 0 h2 0 h3 = 0; h3 0 for(int i = 0; i < 10; i++){
        int height = Integer.parseInt(br.readLine());
        if(h1 < height){
          h3 = h2;
          h2 = h1;
          h1 = height;
        }else if(h2 < height){
          h3 = h2;
          h2 = height;
        }else if(h3 < height){
          h3 = height;
        }
      } int i = 0; int i = 0; i 0 i < 10 i 10 i++ i++ i {
        int height = Integer.parseInt(br.readLine());
        if(h1 < height){
          h3 = h2;
          h2 = h1;
          h1 = height;
        }else if(h2 < height){
          h3 = h2;
          h2 = height;
        }else if(h3 < height){
          h3 = height;
        }
      } {
        int height = Integer.parseInt(br.readLine());
        if(h1 < height){
          h3 = h2;
          h2 = h1;
          h1 = height;
        }else if(h2 < height){
          h3 = h2;
          h2 = height;
        }else if(h3 < height){
          h3 = height;
        }
      } int height = Integer.parseInt(br.readLine()); height Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br if(h1 < height){
          h3 = h2;
          h2 = h1;
          h1 = height;
        }else if(h2 < height){
          h3 = h2;
          h2 = height;
        }else if(h3 < height){
          h3 = height;
        } h1 < height h1 height {
          h3 = h2;
          h2 = h1;
          h1 = height;
        } h3 = h2 h3 h2 h2 = h1 h2 h1 h1 = height h1 height if(h2 < height){
          h3 = h2;
          h2 = height;
        }else if(h3 < height){
          h3 = height;
        } h2 < height h2 height {
          h3 = h2;
          h2 = height;
        } h3 = h2 h3 h2 h2 = height h2 height if(h3 < height){
          h3 = height;
        } h3 < height h3 height {
          h3 = height;
        } h3 = height h3 height sb.append(h1).append("\n") sb.append(h1).append sb.append(h1) sb.append sb h1 "\n" sb.append(h2).append("\n") sb.append(h2).append sb.append(h2) sb.append sb h2 "\n" sb.append(h3).append("\n") sb.append(h3).append sb.append(h3) sb.append sb h3 "\n" System.out.print(sb) System.out.print System.out System System.out sb String[] args args
/* Volume1 */
import java.io.*;

class Main
{
  public static void main(String[] args)
  {
    try{
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      StringBuilder sb = new StringBuilder();
      int h1 = 0,h2 = 0,h3 = 0;

      for(int i = 0; i < 10; i++){
        int height = Integer.parseInt(br.readLine());
        if(h1 < height){
          h3 = h2;
          h2 = h1;
          h1 = height;
        }else if(h2 < height){
          h3 = h2;
          h2 = height;
        }else if(h3 < height){
          h3 = height;
        }
      }

      sb.append(h1).append("\n");
      sb.append(h2).append("\n");
      sb.append(h3).append("\n");

      System.out.print(sb);
    }catch(Exception e){
      System.out.println(e);
    }
  }
}