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

e=(a-b)|(b-c)

print((bool(e|(a|b|c)%2)*(e^~-e).bit_length()-1))
a,b,c=list(map(int,input().split()))

e=(a-b)|(b-c)

print((bool(e|b%2)*(e^~-e).bit_length()-1))
a, b, c = list(map(int, input().split()))
e = (a - b) | (b - c)
print((bool(e | (a | b | c) % 2) * (e ^ ~-e).bit_length() - 1))

a, b, c = list(map(int, input().split()))
e = (a - b) | (b - c)
print((bool(e | b % 2) * (e ^ ~-e).bit_length() - 1))

-print((bool(e | (a | b | c) % 2) * (e ^ ~-e).bit_length() - 1)) +print((bool(e | b % 2) * (e ^ ~-e).bit_length() - 1))