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

ans = 9999

ans = min(ans, abs(a-b) + abs(b-c), abs(a-c) + abs(c-b))

ans = min(ans, abs(b-a) + abs(a-c), abs(b-c) + abs(c-a))

ans = min(ans, abs(c-a) + abs(a-b), abs(c-b) + abs(b-a))

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

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

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

-ans = 9999 -ans = min(ans, abs(a - b) + abs(b - c), abs(a - c) + abs(c - b)) -ans = min(ans, abs(b - a) + abs(a - c), abs(b - c) + abs(c - a)) -ans = min(ans, abs(c - a) + abs(a - b), abs(c - b) + abs(b - a)) -print(ans) +print((max(a, b, c) - min(a, b, c)))