import sys

def qsort(seq):
    if seq == []:
        return seq
    return qsort([x for x in seq[1:] if x < seq[0]]) + seq[0:1] + qsort([x for x in seq[1:] if x >= seq[0]])

data_set = []

for i in range(0, 10):
    data_set.append(int(input()))

rank = qsort(data_set)

for i in range(0,3):
    print(rank.pop(-1)) import sys sys def qsort(seq):
    if seq == []:
        return seq
    return qsort([x for x in seq[1:] if x < seq[0]]) + seq[0:1] + qsort([x for x in seq[1:] if x >= seq[0]]) qsort if seq == []:
        return seq
     seq == [] seq [] return seq seq x for x in seq[1:] if x >= seq[0] for x in seq[1:] if x >= seq[0] x seq[1:] seq 1: 1 x >= seq[0] x seq[0] seq 0 if x >= seq[0] x return qsort([x for x in seq[1:] if x < seq[0]]) + seq[0:1] + qsort([x for x in seq[1:] if x >= seq[0]]) qsort([x for x in seq[1:] if x < seq[0]]) + seq[0:1] + qsort([x for x in seq[1:] if x >= seq[0]]) qsort([x for x in seq[1:] if x < seq[0]]) + seq[0:1] qsort([x for x in seq[1:] if x < seq[0]]) qsort [x for x in seq[1:] if x < seq[0]] seq[0:1] seq 0:1 0 1 qsort([x for x in seq[1:] if x >= seq[0]]) qsort [x for x in seq[1:] if x >= seq[0]] seq seq data_set = [] data_set [] for i in range(0, 10):
    data_set.append(int(input())) i range(0, 10) range 0 10 data_set.append(int(input())) data_set.append data_set append int(input()) int input() input rank = qsort(data_set) rank qsort(data_set) qsort data_set for i in range(0,3):
    print(rank.pop(-1)) i range(0,3) range 0 3 print(rank.pop(-1)) print rank.pop(-1) rank.pop rank pop -1 def qsort(seq):
    if seq == []:
        return seq
    return qsort([x for x in seq[1:] if x < seq[0]]) + seq[0:1] + qsort([x for x in seq[1:] if x >= seq[0]]) def qsort(seq):
    if seq == []:
        return seq
    return qsort([x for x in seq[1:] if x < seq[0]]) + seq[0:1] + qsort([x for x in seq[1:] if x >= seq[0]]) qsort data_set = [] [] data_set rank = qsort(data_set) qsort(data_set) rank
import sys

def qsort(seq):
    if seq == []:
        return seq
    return qsort([x for x in seq[1:] if x < seq[0]]) + seq[0:1] + qsort([x for x in seq[1:] if x >= seq[0]])

data_set = []

for i in range(0, 10):
    data_set.append(int(input()))

rank = qsort(data_set)

for i in range(0,3):
    print(rank.pop(-1))