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



A_sort = sorted(A)

print((abs(A_sort[1] - A_sort[0]) + (A_sort[2] - A_sort[1])))

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

print((c-a))

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

a, b, c = sorted(map(int, input().split()))
print((c - a))

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