import java.io.BufferedReader;
import java.io.InputStreamReader;


public class Main {
    static int rank1 = -1;
    static int rank2 = -1;
    static int rank3 = -1;
    public static void main(String[] args) {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        for (int i=0; i < 10; i ++) {

            try {
                int readVal = Integer.parseInt(br.readLine());
                updateRank(readVal);

            } catch (Exception e) {
            }
        }
        System.out.println(rank1);
        System.out.println(rank2);
        System.out.println(rank3);
    }

    static void updateRank(int rank) {

        if (rank > rank1) {
            rank3 = rank2;
            rank2 = rank1;
            rank1 = rank;
        }
        else if ( rank > rank2) {
            rank3 = rank2;
            rank2 = rank;
        }
        else if (rank > rank3) {
            rank3 = rank;
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
    static int rank1 = -1;
    static int rank2 = -1;
    static int rank3 = -1;
    public static void main(String[] args) {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        for (int i=0; i < 10; i ++) {

            try {
                int readVal = Integer.parseInt(br.readLine());
                updateRank(readVal);

            } catch (Exception e) {
            }
        }
        System.out.println(rank1);
        System.out.println(rank2);
        System.out.println(rank3);
    }

    static void updateRank(int rank) {

        if (rank > rank1) {
            rank3 = rank2;
            rank2 = rank1;
            rank1 = rank;
        }
        else if ( rank > rank2) {
            rank3 = rank2;
            rank2 = rank;
        }
        else if (rank > rank3) {
            rank3 = rank;
        }
    }
} Main static int rank1 = -1; rank1 -1 1 static int rank2 = -1; rank2 -1 1 static int rank3 = -1; rank3 -1 1 public static void main(String[] args) {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        for (int i=0; i < 10; i ++) {

            try {
                int readVal = Integer.parseInt(br.readLine());
                updateRank(readVal);

            } catch (Exception e) {
            }
        }
        System.out.println(rank1);
        System.out.println(rank2);
        System.out.println(rank3);
    } main {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        for (int i=0; i < 10; i ++) {

            try {
                int readVal = Integer.parseInt(br.readLine());
                updateRank(readVal);

            } catch (Exception e) {
            }
        }
        System.out.println(rank1);
        System.out.println(rank2);
        System.out.println(rank3);
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) for (int i=0; i < 10; i ++) {

            try {
                int readVal = Integer.parseInt(br.readLine());
                updateRank(readVal);

            } catch (Exception e) {
            }
        } int i=0; int i=0; i 0 i < 10 i 10 i ++ i ++ i {

            try {
                int readVal = Integer.parseInt(br.readLine());
                updateRank(readVal);

            } catch (Exception e) {
            }
        } {

            try {
                int readVal = Integer.parseInt(br.readLine());
                updateRank(readVal);

            } catch (Exception e) {
            }
        } try {
                int readVal = Integer.parseInt(br.readLine());
                updateRank(readVal);

            } catch (Exception e) {
            } catch (Exception e) {
            } Exception e {
            } {
                int readVal = Integer.parseInt(br.readLine());
                updateRank(readVal);

            } int readVal = Integer.parseInt(br.readLine()); readVal Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br updateRank(readVal) updateRank readVal System.out.println(rank1) System.out.println System.out System System.out rank1 System.out.println(rank2) System.out.println System.out System System.out rank2 System.out.println(rank3) System.out.println System.out System System.out rank3 String[] args args static void updateRank(int rank) {

        if (rank > rank1) {
            rank3 = rank2;
            rank2 = rank1;
            rank1 = rank;
        }
        else if ( rank > rank2) {
            rank3 = rank2;
            rank2 = rank;
        }
        else if (rank > rank3) {
            rank3 = rank;
        }
    } updateRank {

        if (rank > rank1) {
            rank3 = rank2;
            rank2 = rank1;
            rank1 = rank;
        }
        else if ( rank > rank2) {
            rank3 = rank2;
            rank2 = rank;
        }
        else if (rank > rank3) {
            rank3 = rank;
        }
    } if (rank > rank1) {
            rank3 = rank2;
            rank2 = rank1;
            rank1 = rank;
        }
        else if ( rank > rank2) {
            rank3 = rank2;
            rank2 = rank;
        }
        else if (rank > rank3) {
            rank3 = rank;
        } rank > rank1 rank rank1 {
            rank3 = rank2;
            rank2 = rank1;
            rank1 = rank;
        } rank3 = rank2 rank3 rank2 rank2 = rank1 rank2 rank1 rank1 = rank rank1 rank if ( rank > rank2) {
            rank3 = rank2;
            rank2 = rank;
        }
        else if (rank > rank3) {
            rank3 = rank;
        } rank > rank2 rank rank2 {
            rank3 = rank2;
            rank2 = rank;
        } rank3 = rank2 rank3 rank2 rank2 = rank rank2 rank if (rank > rank3) {
            rank3 = rank;
        } rank > rank3 rank rank3 {
            rank3 = rank;
        } rank3 = rank rank3 rank int rank rank public class Main {
    static int rank1 = -1;
    static int rank2 = -1;
    static int rank3 = -1;
    public static void main(String[] args) {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        for (int i=0; i < 10; i ++) {

            try {
                int readVal = Integer.parseInt(br.readLine());
                updateRank(readVal);

            } catch (Exception e) {
            }
        }
        System.out.println(rank1);
        System.out.println(rank2);
        System.out.println(rank3);
    }

    static void updateRank(int rank) {

        if (rank > rank1) {
            rank3 = rank2;
            rank2 = rank1;
            rank1 = rank;
        }
        else if ( rank > rank2) {
            rank3 = rank2;
            rank2 = rank;
        }
        else if (rank > rank3) {
            rank3 = rank;
        }
    }
} public class Main {
    static int rank1 = -1;
    static int rank2 = -1;
    static int rank3 = -1;
    public static void main(String[] args) {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        for (int i=0; i < 10; i ++) {

            try {
                int readVal = Integer.parseInt(br.readLine());
                updateRank(readVal);

            } catch (Exception e) {
            }
        }
        System.out.println(rank1);
        System.out.println(rank2);
        System.out.println(rank3);
    }

    static void updateRank(int rank) {

        if (rank > rank1) {
            rank3 = rank2;
            rank2 = rank1;
            rank1 = rank;
        }
        else if ( rank > rank2) {
            rank3 = rank2;
            rank2 = rank;
        }
        else if (rank > rank3) {
            rank3 = rank;
        }
    }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;


public class Main {
    static int rank1 = -1;
    static int rank2 = -1;
    static int rank3 = -1;
    public static void main(String[] args) {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        for (int i=0; i < 10; i ++) {

            try {
                int readVal = Integer.parseInt(br.readLine());
                updateRank(readVal);

            } catch (Exception e) {
            }
        }
        System.out.println(rank1);
        System.out.println(rank2);
        System.out.println(rank3);
    }

    static void updateRank(int rank) {

        if (rank > rank1) {
            rank3 = rank2;
            rank2 = rank1;
            rank1 = rank;
        }
        else if ( rank > rank2) {
            rank3 = rank2;
            rank2 = rank;
        }
        else if (rank > rank3) {
            rank3 = rank;
        }
    }
}