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

print((max(a,b,c)-min(a,b,c)))
t = list(map(int,input().split()))

print((max(t)-min(t)))
a, b, c = list(map(int, input().split()))
print((max(a, b, c) - min(a, b, c)))

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

-a, b, c = list(map(int, input().split())) -print((max(a, b, c) - min(a, b, c))) +t = list(map(int, input().split())) +print((max(t) - min(t)))