a = list(map(int, input().split()))

for i in range(len(a)):

    j = len(a) - 1

    while i < j:

        if a[j] < a[j-1]:

            t = a[j]

            a[j] = a[j-1]

            a[j-1] = t

        j -= 1



for i in range(len(a)):

    if i == len(a) - 1:

        print(a[i])

    else:

        print(a[i], end=" ")

        

n = [int(i) for i in input().split()]

n = sorted(n)

for i in range(3):

    if i == 2:

        print(n[i])

    else:

        print(n[i], end = " ")

a = list(map(int, input().split()))
for i in range(len(a)):
    j = len(a) - 1
    while i < j:
        if a[j] < a[j - 1]:
            t = a[j]
            a[j] = a[j - 1]
            a[j - 1] = t
        j -= 1
for i in range(len(a)):
    if i == len(a) - 1:
        print(a[i])
    else:
        print(a[i], end=" ")

n = [int(i) for i in input().split()]
n = sorted(n)
for i in range(3):
    if i == 2:
        print(n[i])
    else:
        print(n[i], end=" ")

-a = list(map(int, input().split())) -for i in range(len(a)): -    j = len(a) - 1 -    while i < j: -        if a[j] < a[j - 1]: -            t = a[j] -            a[j] = a[j - 1] -            a[j - 1] = t -        j -= 1 -for i in range(len(a)): -    if i == len(a) - 1: -        print(a[i]) +n = [int(i) for i in input().split()] +n = sorted(n) +for i in range(3): +    if i == 2: +        print(n[i]) -        print(a[i], end=" ") +        print(n[i], end=" ")