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

n.sort()

print((n[2]-n[0]))

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

n.sort()

print((int(n[2]-n[0])))

n = list(map(int, input().split()))
n.sort()
print((n[2] - n[0]))

n = [int(i) for i in input().split()]
n.sort()
print((int(n[2] - n[0])))

-n = list(map(int, input().split())) +n = [int(i) for i in input().split()] -print((n[2] - n[0])) +print((int(n[2] - n[0])))