
n = [0,0,0,0,0,0,0,0,0,0]

for i in range( 0, 10 ):
    n[i] = int(input())

mv = 0
ma = 0

for i in range( 0, 3 ):
    for j in range( 0, 10 ):
        if mv < n[j]:
            mv = n[j]
            ma = j
    print( mv )
    n[ma] = -1
    mv = 0 n = [0,0,0,0,0,0,0,0,0,0] n [0,0,0,0,0,0,0,0,0,0] 0 0 0 0 0 0 0 0 0 0 for i in range( 0, 10 ):
    n[i] = int(input()) i range( 0, 10 ) range 0 10 n[i] = int(input()) n[i] n i int(input()) int input() input mv = 0 mv 0 ma = 0 ma 0 for i in range( 0, 3 ):
    for j in range( 0, 10 ):
        if mv < n[j]:
            mv = n[j]
            ma = j
    print( mv )
    n[ma] = -1
    mv = 0 i range( 0, 3 ) range 0 3 for j in range( 0, 10 ):
        if mv < n[j]:
            mv = n[j]
            ma = j
     j range( 0, 10 ) range 0 10 if mv < n[j]:
            mv = n[j]
            ma = j
     mv < n[j] mv n[j] n j mv = n[j] mv n[j] n j ma = j ma j print( mv ) print mv n[ma] = -1 n[ma] n ma -1 mv = 0 mv 0 ma = j j ma mv = 0 0 mv ma = 0 0 ma mv = 0 0 mv n = [0,0,0,0,0,0,0,0,0,0] [0,0,0,0,0,0,0,0,0,0] n mv = n[j] n[j] mv

n = [0,0,0,0,0,0,0,0,0,0]

for i in range( 0, 10 ):
    n[i] = int(input())

mv = 0
ma = 0

for i in range( 0, 3 ):
    for j in range( 0, 10 ):
        if mv < n[j]:
            mv = n[j]
            ma = j
    print( mv )
    n[ma] = -1
    mv = 0