import java.io.*;

class Main {
    public static void main(String[] args) throws java.io.IOException{
        int fst = 0,snd = 0,thi = 0;
        int temp;
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        for (int i=0; i<10; i++) {
            int j = Integer.parseInt(in.readLine());
            if (j > fst) {
                temp = snd;
                snd = fst;
                thi = temp;
                fst = j;
            } else if (j > snd) {
                thi = snd;
                snd = j;
            } else if (j > thi) {
                thi = j;
            }
        }
        System.out.println(fst);
        System.out.println(snd);
        System.out.println(thi);
    }
} import java.io.*; io.* java class Main {
    public static void main(String[] args) throws java.io.IOException{
        int fst = 0,snd = 0,thi = 0;
        int temp;
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        for (int i=0; i<10; i++) {
            int j = Integer.parseInt(in.readLine());
            if (j > fst) {
                temp = snd;
                snd = fst;
                thi = temp;
                fst = j;
            } else if (j > snd) {
                thi = snd;
                snd = j;
            } else if (j > thi) {
                thi = j;
            }
        }
        System.out.println(fst);
        System.out.println(snd);
        System.out.println(thi);
    }
} Main public static void main(String[] args) throws java.io.IOException{
        int fst = 0,snd = 0,thi = 0;
        int temp;
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        for (int i=0; i<10; i++) {
            int j = Integer.parseInt(in.readLine());
            if (j > fst) {
                temp = snd;
                snd = fst;
                thi = temp;
                fst = j;
            } else if (j > snd) {
                thi = snd;
                snd = j;
            } else if (j > thi) {
                thi = j;
            }
        }
        System.out.println(fst);
        System.out.println(snd);
        System.out.println(thi);
    } main {
        int fst = 0,snd = 0,thi = 0;
        int temp;
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        for (int i=0; i<10; i++) {
            int j = Integer.parseInt(in.readLine());
            if (j > fst) {
                temp = snd;
                snd = fst;
                thi = temp;
                fst = j;
            } else if (j > snd) {
                thi = snd;
                snd = j;
            } else if (j > thi) {
                thi = j;
            }
        }
        System.out.println(fst);
        System.out.println(snd);
        System.out.println(thi);
    } int fst = 0 fst 0 snd = 0 snd 0 thi = 0; thi 0 int temp; temp BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) for (int i=0; i<10; i++) {
            int j = Integer.parseInt(in.readLine());
            if (j > fst) {
                temp = snd;
                snd = fst;
                thi = temp;
                fst = j;
            } else if (j > snd) {
                thi = snd;
                snd = j;
            } else if (j > thi) {
                thi = j;
            }
        } int i=0; int i=0; i 0 i<10 i 10 i++ i++ i {
            int j = Integer.parseInt(in.readLine());
            if (j > fst) {
                temp = snd;
                snd = fst;
                thi = temp;
                fst = j;
            } else if (j > snd) {
                thi = snd;
                snd = j;
            } else if (j > thi) {
                thi = j;
            }
        } {
            int j = Integer.parseInt(in.readLine());
            if (j > fst) {
                temp = snd;
                snd = fst;
                thi = temp;
                fst = j;
            } else if (j > snd) {
                thi = snd;
                snd = j;
            } else if (j > thi) {
                thi = j;
            }
        } int j = Integer.parseInt(in.readLine()); j Integer.parseInt(in.readLine()) Integer.parseInt Integer in.readLine() in.readLine in if (j > fst) {
                temp = snd;
                snd = fst;
                thi = temp;
                fst = j;
            } else if (j > snd) {
                thi = snd;
                snd = j;
            } else if (j > thi) {
                thi = j;
            } j > fst j fst {
                temp = snd;
                snd = fst;
                thi = temp;
                fst = j;
            } temp = snd temp snd snd = fst snd fst thi = temp thi temp fst = j fst j if (j > snd) {
                thi = snd;
                snd = j;
            } else if (j > thi) {
                thi = j;
            } j > snd j snd {
                thi = snd;
                snd = j;
            } thi = snd thi snd snd = j snd j if (j > thi) {
                thi = j;
            } j > thi j thi {
                thi = j;
            } thi = j thi j System.out.println(fst) System.out.println System.out System System.out fst System.out.println(snd) System.out.println System.out System System.out snd System.out.println(thi) System.out.println System.out System System.out thi String[] args args
import java.io.*;

class Main {
    public static void main(String[] args) throws java.io.IOException{
        int fst = 0,snd = 0,thi = 0;
        int temp;
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        for (int i=0; i<10; i++) {
            int j = Integer.parseInt(in.readLine());
            if (j > fst) {
                temp = snd;
                snd = fst;
                thi = temp;
                fst = j;
            } else if (j > snd) {
                thi = snd;
                snd = j;
            } else if (j > thi) {
                thi = j;
            }
        }
        System.out.println(fst);
        System.out.println(snd);
        System.out.println(thi);
    }
}