max = [0,0,0]
for a in range(10):
    s = int(input())
    if max[0] < s:
        max[2] = max[1]
        max[1] = max[0]
        max[0] = s
    elif max[1] < s:
        max[2] = max[1]
        max[1] = s
    elif max[2] < s:
        max[2] = s
for a in max:
    print(a) max = [0,0,0] max [0,0,0] 0 0 0 for a in range(10):
    s = int(input())
    if max[0] < s:
        max[2] = max[1]
        max[1] = max[0]
        max[0] = s
    elif max[1] < s:
        max[2] = max[1]
        max[1] = s
    elif max[2] < s:
        max[2] = s a range(10) range 10 s = int(input()) s int(input()) int input() input if max[0] < s:
        max[2] = max[1]
        max[1] = max[0]
        max[0] = s
    elif max[1] < s:
        max[2] = max[1]
        max[1] = s
    elif max[2] < s:
        max[2] = s max[0] < s max[0] max 0 s max[2] = max[1] max[2] max 2 max[1] max 1 max[1] = max[0] max[1] max 1 max[0] max 0 max[0] = s max[0] max 0 s elif max[1] < s:
        max[2] = max[1]
        max[1] = s
     max[1] < s max[1] max 1 s max[2] = max[1] max[2] max 2 max[1] max 1 max[1] = s max[1] max 1 s elif max[2] < s:
        max[2] = s max[2] < s max[2] max 2 s max[2] = s max[2] max 2 s for a in max:
    print(a) a max print(a) print a max = [0,0,0] [0,0,0] max s = int(input()) int(input()) s
max = [0,0,0]
for a in range(10):
    s = int(input())
    if max[0] < s:
        max[2] = max[1]
        max[1] = max[0]
        max[0] = s
    elif max[1] < s:
        max[2] = max[1]
        max[1] = s
    elif max[2] < s:
        max[2] = s
for a in max:
    print(a)
