def qsort(l):
    if l == []: return []
    else:
        pv = l[0]
        left = []
        right = []
        for i in range(1, len(l)):
            if l[i] > pv:
                left.append(l[i])
            else:
                right.append(l[i])
        left = qsort(left)
        right = qsort(right)
        left.append(pv)
        return left + right

def main():
    lst = []
    for i in range(0, 10):
        lst.append(int(raw_input()))

    lst = qsort(lst)
    for i in range(0, 3):
        print(lst[i])

main() def qsort(l):
    if l == []: return []
    else:
        pv = l[0]
        left = []
        right = []
        for i in range(1, len(l)):
            if l[i] > pv:
                left.append(l[i])
            else:
                right.append(l[i])
        left = qsort(left)
        right = qsort(right)
        left.append(pv)
        return left + right qsort if l == []: return []
    else:
        pv = l[0]
        left = []
        right = []
        for i in range(1, len(l)):
            if l[i] > pv:
                left.append(l[i])
            else:
                right.append(l[i])
        left = qsort(left)
        right = qsort(right)
        left.append(pv)
        return left + right l == [] l [] pv = l[0] pv l[0] l 0 left = [] left [] right = [] right [] for i in range(1, len(l)):
            if l[i] > pv:
                left.append(l[i])
            else:
                right.append(l[i])
         i range(1, len(l)) range 1 len(l) len l if l[i] > pv:
                left.append(l[i])
            else:
                right.append(l[i])
         l[i] > pv l[i] l i pv left.append(l[i]) left.append left append l[i] l i right.append(l[i]) right.append right append l[i] l i left = qsort(left) left qsort(left) qsort left right = qsort(right) right qsort(right) qsort right left.append(pv) left.append left append pv return left + right left + right left right l l def main():
    lst = []
    for i in range(0, 10):
        lst.append(int(raw_input()))

    lst = qsort(lst)
    for i in range(0, 3):
        print(lst[i]) main lst = [] lst [] for i in range(0, 10):
        lst.append(int(raw_input()))

     i range(0, 10) range 0 10 lst.append(int(raw_input())) lst.append lst append int(raw_input()) int raw_input() raw_input lst = qsort(lst) lst qsort(lst) qsort lst for i in range(0, 3):
        print(lst[i]) i range(0, 3) range 0 3 print(lst[i]) print lst[i] lst i main() main def qsort(l):
    if l == []: return []
    else:
        pv = l[0]
        left = []
        right = []
        for i in range(1, len(l)):
            if l[i] > pv:
                left.append(l[i])
            else:
                right.append(l[i])
        left = qsort(left)
        right = qsort(right)
        left.append(pv)
        return left + right def qsort(l):
    if l == []: return []
    else:
        pv = l[0]
        left = []
        right = []
        for i in range(1, len(l)):
            if l[i] > pv:
                left.append(l[i])
            else:
                right.append(l[i])
        left = qsort(left)
        right = qsort(right)
        left.append(pv)
        return left + right qsort def main():
    lst = []
    for i in range(0, 10):
        lst.append(int(raw_input()))

    lst = qsort(lst)
    for i in range(0, 3):
        print(lst[i]) def main():
    lst = []
    for i in range(0, 10):
        lst.append(int(raw_input()))

    lst = qsort(lst)
    for i in range(0, 3):
        print(lst[i]) main
def qsort(l):
    if l == []: return []
    else:
        pv = l[0]
        left = []
        right = []
        for i in range(1, len(l)):
            if l[i] > pv:
                left.append(l[i])
            else:
                right.append(l[i])
        left = qsort(left)
        right = qsort(right)
        left.append(pv)
        return left + right

def main():
    lst = []
    for i in range(0, 10):
        lst.append(int(raw_input()))

    lst = qsort(lst)
    for i in range(0, 3):
        print(lst[i])

main()