import java.util.Scanner;
import java.util.Arrays;

class Main {
  public static void main(String[] args){
    Scanner cin = new Scanner(System.in);
    MyArray myArray = new MyArray(10);
    
    for (int i = 0; i < 10; i++){
      myArray.input(cin.nextInt());
    }
    myArray.sort();
    for (int i = 0; i < 3; i++){
      System.out.println(myArray.top());
      myArray.pop();
    }
  }
}

class MyArray {
  private int num[];
  private int size = 0;
  
  MyArray(int n){
    this.num = new int[n];
  }

  protected void sort(){
    Arrays.sort(num);
  }

  protected int top(){
    if (size == 0) {
//      System.out.println("empty");
      return (0);
    }
    return (num[size - 1]);
  }

  protected void pop(){
    for (int i = size - 1; i > 1; i--){
      num[i] = num[i - 1];
    }
  }

  protected void input(int n){
    num[size] = n;
    size++;
  }

  protected int at(int n){
    return (num[n]);
  }
} import java.util.Scanner; Scanner java.util import java.util.Arrays; Arrays java.util class Main {
  public static void main(String[] args){
    Scanner cin = new Scanner(System.in);
    MyArray myArray = new MyArray(10);
    
    for (int i = 0; i < 10; i++){
      myArray.input(cin.nextInt());
    }
    myArray.sort();
    for (int i = 0; i < 3; i++){
      System.out.println(myArray.top());
      myArray.pop();
    }
  }
} Main public static void main(String[] args){
    Scanner cin = new Scanner(System.in);
    MyArray myArray = new MyArray(10);
    
    for (int i = 0; i < 10; i++){
      myArray.input(cin.nextInt());
    }
    myArray.sort();
    for (int i = 0; i < 3; i++){
      System.out.println(myArray.top());
      myArray.pop();
    }
  } main {
    Scanner cin = new Scanner(System.in);
    MyArray myArray = new MyArray(10);
    
    for (int i = 0; i < 10; i++){
      myArray.input(cin.nextInt());
    }
    myArray.sort();
    for (int i = 0; i < 3; i++){
      System.out.println(myArray.top());
      myArray.pop();
    }
  } Scanner cin = new Scanner(System.in); cin new Scanner(System.in) MyArray myArray = new MyArray(10); myArray new MyArray(10) for (int i = 0; i < 10; i++){
      myArray.input(cin.nextInt());
    } int i = 0; int i = 0; i 0 i < 10 i 10 i++ i++ i {
      myArray.input(cin.nextInt());
    } {
      myArray.input(cin.nextInt());
    } myArray.input(cin.nextInt()) myArray.input myArray cin.nextInt() cin.nextInt cin myArray.sort() myArray.sort myArray for (int i = 0; i < 3; i++){
      System.out.println(myArray.top());
      myArray.pop();
    } int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
      System.out.println(myArray.top());
      myArray.pop();
    } {
      System.out.println(myArray.top());
      myArray.pop();
    } System.out.println(myArray.top()) System.out.println System.out System System.out myArray.top() myArray.top myArray myArray.pop() myArray.pop myArray String[] args args class MyArray {
  private int num[];
  private int size = 0;
  
  MyArray(int n){
    this.num = new int[n];
  }

  protected void sort(){
    Arrays.sort(num);
  }

  protected int top(){
    if (size == 0) {
//      System.out.println("empty");
      return (0);
    }
    return (num[size - 1]);
  }

  protected void pop(){
    for (int i = size - 1; i > 1; i--){
      num[i] = num[i - 1];
    }
  }

  protected void input(int n){
    num[size] = n;
    size++;
  }

  protected int at(int n){
    return (num[n]);
  }
} MyArray private int num[]; num private int size = 0; size 0 MyArray(int n){
    this.num = new int[n];
  } MyArray {
    this.num = new int[n];
  } this.num = new int[n] this.num this this.num new int[n] n int n n protected void sort(){
    Arrays.sort(num);
  } sort {
    Arrays.sort(num);
  } Arrays.sort(num) Arrays.sort Arrays num protected int top(){
    if (size == 0) {
//      System.out.println("empty");
      return (0);
    }
    return (num[size - 1]);
  } top {
    if (size == 0) {
//      System.out.println("empty");
      return (0);
    }
    return (num[size - 1]);
  } if (size == 0) {
//      System.out.println("empty");
      return (0);
    } size == 0 size 0 {
//      System.out.println("empty");
      return (0);
    } return (0); (0) return (num[size - 1]); (num[size - 1]) num size - 1 size 1 protected void pop(){
    for (int i = size - 1; i > 1; i--){
      num[i] = num[i - 1];
    }
  } pop {
    for (int i = size - 1; i > 1; i--){
      num[i] = num[i - 1];
    }
  } for (int i = size - 1; i > 1; i--){
      num[i] = num[i - 1];
    } int i = size - 1; int i = size - 1; i size - 1 size 1 i > 1 i 1 i-- i-- i {
      num[i] = num[i - 1];
    } {
      num[i] = num[i - 1];
    } num[i] = num[i - 1] num[i] num i num[i - 1] num i - 1 i 1 protected void input(int n){
    num[size] = n;
    size++;
  } input {
    num[size] = n;
    size++;
  } num[size] = n num[size] num size n size++ size int n n protected int at(int n){
    return (num[n]);
  } at {
    return (num[n]);
  } return (num[n]); (num[n]) num n int n n
import java.util.Scanner;
import java.util.Arrays;

class Main {
  public static void main(String[] args){
    Scanner cin = new Scanner(System.in);
    MyArray myArray = new MyArray(10);
    
    for (int i = 0; i < 10; i++){
      myArray.input(cin.nextInt());
    }
    myArray.sort();
    for (int i = 0; i < 3; i++){
      System.out.println(myArray.top());
      myArray.pop();
    }
  }
}

class MyArray {
  private int num[];
  private int size = 0;
  
  MyArray(int n){
    this.num = new int[n];
  }

  protected void sort(){
    Arrays.sort(num);
  }

  protected int top(){
    if (size == 0) {
//      System.out.println("empty");
      return (0);
    }
    return (num[size - 1]);
  }

  protected void pop(){
    for (int i = size - 1; i > 1; i--){
      num[i] = num[i - 1];
    }
  }

  protected void input(int n){
    num[size] = n;
    size++;
  }

  protected int at(int n){
    return (num[n]);
  }
}