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

a.sort()

print((abs(a[0]-a[1]) + abs(a[1]-a[2])))
A = list(map(int, input().split()))

ans = 0

A.sort()

for i in range(1, len(A)):

  ans += abs(A[i] - A[i-1])

print(ans)
a = list(map(int, input().split()))
a.sort()
print((abs(a[0] - a[1]) + abs(a[1] - a[2])))

A = list(map(int, input().split()))
ans = 0
A.sort()
for i in range(1, len(A)):
    ans += abs(A[i] - A[i - 1])
print(ans)

-a = list(map(int, input().split())) -a.sort() -print((abs(a[0] - a[1]) + abs(a[1] - a[2]))) +A = list(map(int, input().split())) +ans = 0 +A.sort() +for i in range(1, len(A)): +    ans += abs(A[i] - A[i - 1]) +print(ans)