import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        try (Scanner in = new Scanner(System.in)) {
            solve(in);
        }
    }

    private static void solve(Scanner in) {
        int a = 0, b = 0, c = 0;
        for (int i = 0; i < 10; i++) {
            int h = in.nextInt();
            if (a < h) {
                c = b;
                b = a;
                a = h;
            } else if (b < h) {
                c = b;
                b = h;
            } else if (c < h) {
                c = h;
            }
        }
        System.out.println(a + "\n" + b + "\n" + c);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        try (Scanner in = new Scanner(System.in)) {
            solve(in);
        }
    }

    private static void solve(Scanner in) {
        int a = 0, b = 0, c = 0;
        for (int i = 0; i < 10; i++) {
            int h = in.nextInt();
            if (a < h) {
                c = b;
                b = a;
                a = h;
            } else if (b < h) {
                c = b;
                b = h;
            } else if (c < h) {
                c = h;
            }
        }
        System.out.println(a + "\n" + b + "\n" + c);
    }
} Main public static void main(String[] args) {
        try (Scanner in = new Scanner(System.in)) {
            solve(in);
        }
    } main {
        try (Scanner in = new Scanner(System.in)) {
            solve(in);
        }
    } try (Scanner in = new Scanner(System.in)) {
            solve(in);
        } {
            solve(in);
        } Scanner in = new Scanner(System.in) Scanner in = new Scanner(System.in) new Scanner(System.in) solve(in) solve in String[] args args private static void solve(Scanner in) {
        int a = 0, b = 0, c = 0;
        for (int i = 0; i < 10; i++) {
            int h = in.nextInt();
            if (a < h) {
                c = b;
                b = a;
                a = h;
            } else if (b < h) {
                c = b;
                b = h;
            } else if (c < h) {
                c = h;
            }
        }
        System.out.println(a + "\n" + b + "\n" + c);
    } solve {
        int a = 0, b = 0, c = 0;
        for (int i = 0; i < 10; i++) {
            int h = in.nextInt();
            if (a < h) {
                c = b;
                b = a;
                a = h;
            } else if (b < h) {
                c = b;
                b = h;
            } else if (c < h) {
                c = h;
            }
        }
        System.out.println(a + "\n" + b + "\n" + c);
    } int a = 0 a 0 b = 0 b 0 c = 0; c 0 for (int i = 0; i < 10; i++) {
            int h = in.nextInt();
            if (a < h) {
                c = b;
                b = a;
                a = h;
            } else if (b < h) {
                c = b;
                b = h;
            } else if (c < h) {
                c = h;
            }
        } int i = 0; int i = 0; i 0 i < 10 i 10 i++ i++ i {
            int h = in.nextInt();
            if (a < h) {
                c = b;
                b = a;
                a = h;
            } else if (b < h) {
                c = b;
                b = h;
            } else if (c < h) {
                c = h;
            }
        } {
            int h = in.nextInt();
            if (a < h) {
                c = b;
                b = a;
                a = h;
            } else if (b < h) {
                c = b;
                b = h;
            } else if (c < h) {
                c = h;
            }
        } int h = in.nextInt(); h in.nextInt() in.nextInt in if (a < h) {
                c = b;
                b = a;
                a = h;
            } else if (b < h) {
                c = b;
                b = h;
            } else if (c < h) {
                c = h;
            } a < h a h {
                c = b;
                b = a;
                a = h;
            } c = b c b b = a b a a = h a h if (b < h) {
                c = b;
                b = h;
            } else if (c < h) {
                c = h;
            } b < h b h {
                c = b;
                b = h;
            } c = b c b b = h b h if (c < h) {
                c = h;
            } c < h c h {
                c = h;
            } c = h c h System.out.println(a + "\n" + b + "\n" + c) System.out.println System.out System System.out a + "\n" + b + "\n" + c "\n" b a + "\n" + b + "\n" + c a "\n" b "\n" c Scanner in in public class Main {
    public static void main(String[] args) {
        try (Scanner in = new Scanner(System.in)) {
            solve(in);
        }
    }

    private static void solve(Scanner in) {
        int a = 0, b = 0, c = 0;
        for (int i = 0; i < 10; i++) {
            int h = in.nextInt();
            if (a < h) {
                c = b;
                b = a;
                a = h;
            } else if (b < h) {
                c = b;
                b = h;
            } else if (c < h) {
                c = h;
            }
        }
        System.out.println(a + "\n" + b + "\n" + c);
    }
} public class Main {
    public static void main(String[] args) {
        try (Scanner in = new Scanner(System.in)) {
            solve(in);
        }
    }

    private static void solve(Scanner in) {
        int a = 0, b = 0, c = 0;
        for (int i = 0; i < 10; i++) {
            int h = in.nextInt();
            if (a < h) {
                c = b;
                b = a;
                a = h;
            } else if (b < h) {
                c = b;
                b = h;
            } else if (c < h) {
                c = h;
            }
        }
        System.out.println(a + "\n" + b + "\n" + c);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        try (Scanner in = new Scanner(System.in)) {
            solve(in);
        }
    }

    private static void solve(Scanner in) {
        int a = 0, b = 0, c = 0;
        for (int i = 0; i < 10; i++) {
            int h = in.nextInt();
            if (a < h) {
                c = b;
                b = a;
                a = h;
            } else if (b < h) {
                c = b;
                b = h;
            } else if (c < h) {
                c = h;
            }
        }
        System.out.println(a + "\n" + b + "\n" + c);
    }
}