def quicksort(array):
    if len(array) < 2:
        return array
    else:
        pivot = array[0]
        less = [i for i in array[1:] if i <= pivot]

        greater = [i for i in array[1:] if i > pivot]

        return quicksort(less) + [pivot] + quicksort(greater)


array = []
for _ in range(10):
    array.append(int(input()))

sorted_array = quicksort(array)
for i in range(3):
    print(sorted_array[9-i]) def quicksort(array):
    if len(array) < 2:
        return array
    else:
        pivot = array[0]
        less = [i for i in array[1:] if i <= pivot]

        greater = [i for i in array[1:] if i > pivot]

        return quicksort(less) + [pivot] + quicksort(greater) quicksort if len(array) < 2:
        return array
    else:
        pivot = array[0]
        less = [i for i in array[1:] if i <= pivot]

        greater = [i for i in array[1:] if i > pivot]

        return quicksort(less) + [pivot] + quicksort(greater) len(array) < 2 len(array) len array 2 return array array pivot = array[0] pivot array[0] array 0 i for i in array[1:] if i <= pivot for i in array[1:] if i <= pivot i array[1:] array 1: 1 i <= pivot i pivot if i <= pivot i less = [i for i in array[1:] if i <= pivot] less [i for i in array[1:] if i <= pivot] i for i in array[1:] if i > pivot for i in array[1:] if i > pivot i array[1:] array 1: 1 i > pivot i pivot if i > pivot i greater = [i for i in array[1:] if i > pivot] greater [i for i in array[1:] if i > pivot] return quicksort(less) + [pivot] + quicksort(greater) quicksort(less) + [pivot] + quicksort(greater) quicksort(less) + [pivot] quicksort(less) quicksort less [pivot] pivot quicksort(greater) quicksort greater array array array = [] array [] for _ in range(10):
    array.append(int(input())) _ range(10) range 10 array.append(int(input())) array.append array append int(input()) int input() input sorted_array = quicksort(array) sorted_array quicksort(array) quicksort array for i in range(3):
    print(sorted_array[9-i]) i range(3) range 3 print(sorted_array[9-i]) print sorted_array[9-i] sorted_array 9-i 9 i def quicksort(array):
    if len(array) < 2:
        return array
    else:
        pivot = array[0]
        less = [i for i in array[1:] if i <= pivot]

        greater = [i for i in array[1:] if i > pivot]

        return quicksort(less) + [pivot] + quicksort(greater) def quicksort(array):
    if len(array) < 2:
        return array
    else:
        pivot = array[0]
        less = [i for i in array[1:] if i <= pivot]

        greater = [i for i in array[1:] if i > pivot]

        return quicksort(less) + [pivot] + quicksort(greater) quicksort sorted_array = quicksort(array) quicksort(array) sorted_array array = [] [] array
def quicksort(array):
    if len(array) < 2:
        return array
    else:
        pivot = array[0]
        less = [i for i in array[1:] if i <= pivot]

        greater = [i for i in array[1:] if i > pivot]

        return quicksort(less) + [pivot] + quicksort(greater)


array = []
for _ in range(10):
    array.append(int(input()))

sorted_array = quicksort(array)
for i in range(3):
    print(sorted_array[9-i])