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

x = max(c)

c.remove(x)

y = max(c)

c.remove(y)

z = max(c)

c.remove(z)



print((x - z))
*a, = list(map(int,input().split()))

print((max(a)-min(a)))
c = list(map(int, input().split()))
x = max(c)
c.remove(x)
y = max(c)
c.remove(y)
z = max(c)
c.remove(z)
print((x - z))

(*a,) = list(map(int, input().split()))
print((max(a) - min(a)))

-c = list(map(int, input().split())) -x = max(c) -c.remove(x) -y = max(c) -c.remove(y) -z = max(c) -c.remove(z) -print((x - z)) +(*a,) = list(map(int, input().split())) +print((max(a) - min(a)))