a = int(input())b = int(input())c = int(input())
numbers = [a, b, c]numbers.sort()
for number in numbers:print(number)
a = int(input())
b = int(input())
c = int(input())
numbers = [a, b, c]
numbers.sort()
for number in numbers:
print(number)