peterverebics/CodeNet_Python_118 huggingface dataset:
s=input()
fs=int(s[:2])
ls=int(s[2:])
if 1<=fs<=12 and ls>=13:
    print('MMYY')
elif 1<=fs<=12 and 1<=ls<=12:
    print('AMBIGUOUS')
elif fs>=13 and 1<=ls<=12:
    print('YYMM')
else:
    print('NO')
s = input()
head = int(s[0])*10 + int(s[1])
back = int(s[2])*10 + int(s[3])
if(1 <= head and head <= 12 and 1 <= back and back <= 12):
    print('AMBIGUOUS')
elif(1 <= head and 1 <= back and back <= 12):
    print('YYMM')
elif 1 <= back and 1 <= head and head <= 12:
    print('MMYY')
else:
    print('NA')
a = input()
frm = int(a[:2])
lat = int(a[2:])


if frm >= 12 and lat >= 12:
    print('NA')
elif frm <= 12 and lat > 12:
    if 0<frm:
        print('MMYY')
    else:
        print('NA')
        
    
elif frm > 12 and  lat <= 12:
    if lat > 0:
        print('YYMM')
    else:
        print('NA')    
else:
    print('AMBIGUOUS')
def main():
    s=input()
    s1=int(s[:2])
    s2=int(s[2:])
    yymm = 0 < s1 and 1 <= s2 <= 12
    mmyy = 1 <= s1 <= 12 and 0 < s2
    if yymm and mmyy:
        print("AMBIGUOUS")
    elif yymm:
        print("YYMM")
    elif mmyy:
        print("MMYY")
    else:
        print("NA")

if __name__ == "__main__":
    main()
S = input()
f,e = int(S[:2]),int(S[2:])
if (f==0 and e>12) or (f>12 and e==0) or (f>12 and e>12):
  print('NA')
if 1<=f<=12 and 1<=e<=12:
    print('AMBIGUOUS')
if 1<=f<=12 and e>12:
    print('MMYY')
if f>12 and 1<=e<=12:
    print('YYMM')
S=input()
x=int(S[:2])
y=int(S[2:])
if x*y==0:
    print("NA")
elif 0<x<=12:
    if y<=12:
        print("AMBIGUOUS")
    else:
        print("MMYY")
elif x>=13:
    if y<=12:
        print("YYMM")
    else:
        print("NA")
s = input()

n1 = s[0:2]
n2 = s[2:4]

if int(n1) > 12 and int(n2) > 12:
    out_print = 'NA'

elif int(n1) <= 12 and int(n2) <= 12:
    out_print = 'AMBIGUOUS'

elif int(n1) <= 12 and int(n2) >12:
    out_print = 'MMYY'
    if int(n1) == 0:
        out_print = 'NA'
elif int(n1) > 12 and int(n2) <= 12:
    out_print = 'YYMM'
    print(n2)
    if int(n2) == 0:
        out_print = 'NA'

print(out_print)
s = input()
s1 = int(s[0]+s[1])
s2 = int(s[2]+s[3])
if s1 <= 12:
    if s2 <= 12:
        print('AMBIGUOUS')
    else:
        print('MMYY')
elif s2 <= 12:
    print('YYMM')
else:
    print('NA')
s = input()
t = int(s[:2])
tt = int(s[2:])
if t <= 12 and tt <= 12 and (t >= 1 or tt >= 1):
  print("AMBIGUOUS")
elif t > 12 and tt <= 12 and tt >= 1:
  print("YYMM")
elif t <= 12 and tt > 12 and t >= 1:
  print("MMYY")
else:
  print("NA")
s = input()
sh = int(s[:2])
se = int(s[2:])
ans = "YYMM" if sh > 12 else ("MMYY" if se > 12 else ("NA" if (sh + se) == 0 else "AMBIGUOUS"))
if sh == 0 or se == 0:
    ans = "NA"
print(ans)
s = input()
a, b = int(s[:2]), int(s[2:])
yymm, mmyy = 0, 0

if 1<=a<=12 and 1<=b<=12:
  print('AMBIGUOUS')
elif a>12 and 1<=b<=12:
  print('YYMM')
elif 1<=a<=12 and b>12:
  print('MMYY')
else:
  print('NA')
S=str(input())

Ans=[int(S[0]+S[1]),int(S[2]+S[3])]

if Ans[0]==0 or Ans[1]==0:
    print("NA")
elif Ans[0]>12 or Ans[0]<1:
    if Ans[1]>12 or Ans[1]<1:
        print("NA")
    else:
        print("YYMM")
else:
    if Ans[1]>12 or Ans[1]<1:
        print("MMYY")
    else:
        print("AMBIGUOS")
S = str(input())
front = int(S[:2])
back = int(S[2:])
S_list = list(S)

if front > 12 or front == 0:
    if 1 < back <= 12 :
        print("YYMM")
    else:
        print("NA")
elif front <= 12 and front == 0:
    if 1 < back <= 12: 
        print("AMBIGUOUS")
    else:
        print("MMYY")
ym = int(input())
 
ym1 = int(ym/100)
ym2 = int(ym%100)

print(ym1,ym2)
 
if ym1 >= 1 and ym1 <= 12 and ym2 >= 1 and ym2 <=12:
  print('AMBIGUOUS')
elif ym2>=1 and ym2<=12:
  print('YYMM')
elif ym1>=1 and ym1<=12:
  print('MMYY')
else:
  print('NA')
#input
S = str(input())

#output
S1 = int(S[:2])
S2 = int(S[2:])

if S1*S2 == 0:
    print("NA")
elif 0 < S1 <= 12 and 0 < S2 <= 12:
    print("AMBIGUOUS")
elif S1 > 12 and 0 < S2 <= 12:
    print("YYMM")
elif 0 < S1 <= 12 and S2 > 12:
    print("MMYY")
def main():
    s = input()
    first, second = int(s[:2]), int(s[2:])
    if 1 <= first <= 12:
        if 1 <= second <= 12:
            print("AMBIGOUS")
        else:
            print("MMYY")
    elif 1 <= second <= 12:
        if 1 <= first <= 12:
            print("AMBIGOUS")
        else:
            print("YYMM")
    else:
        print("NA")


main()
#126 b
def change(x):
    if 1<=x<=12:
        return 0
    else:
        return 1
ans=["AMBIGOUS","NA","MMYY","YYMM"]#[00,11,01,10]
s=input()
a=change(int(s[:2]))
b=change(int(s[2:]))
if a==b:
    print(ans[a])
else:
    print(ans[a+2])
import sys
input = lambda: sys.stdin.readline().rstrip()

S = input()

f = int(S[:2])
s = int(S[2:])

if (f <= 0 and s > 12) or (f > 12 and s <= 0):
    print("NA")
elif f > 12 and s <= 12:
    print("YYMM")
elif f <= 12 and s > 12:
    print("MMYY")
elif f <= 12 and s <= 12:
    print("AMBIGUOUS")
from sys import stdin, setrecursionlimit


def main():
    input = stdin.buffer.readline
    s = input()[:-1].decode()
    l = int(s[:2])
    r = int(s[2:])
    if l >= 13 and 1 <= r <= 12:
        print('YYMM')
    elif 1 <= l <= 12 and r >= 13:
        print('MMYY')
    elif 1 <= l <= 12 and 1 <= r <= 12:
        print('AMBIGUOUS')
    else:
        print('NA')


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()
s = input()
if 0 < int(s[:2]) and int(s[2:]) < 13:
    print("AMBIGUOUS")
elif 0 < int(s[:2]) < 13 and int(s[2:]) != 0:
    print("MMYY")
elif 0 < int(s[2:]) < 13 and int(s[:2]) != 0:
    print("YYMM")
else:
    print("NA")
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))
#l = [list(map(int,input().split())) for i in range(n)]

s = input()

temp1 = int(s[0:2])
temp2 = int(s[2:4])

if temp1 >= 1 and temp1 <= 12:
    if (temp2 < 1 or temp2 > 12):
        print("MMYY")
    else:
        print("AMBIGUOUS")
else:
    if (temp2 >= 1 and temp2 < 12):
        print("YYMM")
    else:
        print("NA")
def resolve():
    S = list(input())

    front = int(''.join(S[:2]))
    back = int(''.join(S[2:]))

    if (0 == front and 12 < back) or (0 == back and 12 < front):
        print('NA')
        return

    if (front <= 12 and back <= 12):
        print('AMBIGUOUS')
        return

    if (front > 12 and back <= 12):
        print('YYMM')
        return

    if (front <= 12 and back > 12):
        print('MMYY')
        return

    print('NA')

resolve()
s = int(input())
f = s/100
l = s%100
if 1 <= f and f <= 12:
    if 1 <= l and l <= 12:
        print('AMBIGUOUS')
    else:
        print('MMYY')
else:
    if 1 <= l and l <= 12:
        print('AMBIGUOUS')
    else:
        print('NA')
S = input()

s1 = int(S[0] + S[1])
s2 = int(S[2] + S[3])

if s1 > 12: #YY
    if s2 > 12 or s2 == 0:
        print('NA')
    else:
        print('YYMM')
elif s2 > 12: #YY
    if s1 > 12:
        print('NA')
    else:
        print('MMYY')
else:
    print('AMBIGUOUS')
S = input()
a = 0
b = 0
if (S[0] == '0' and S[1] != '0') or (S[0] == '1' and (S[1] == '1' or S[1] == '2')):
  a = 1
if (S[2] == '0' and S[1] != '0') or (S[2] == '1' and (S[3] == '1' or S[3] == '2')):
  b = 1
if a == 1 and b == 1:
  print("AMBIGUOUS")
elif a == 1:
  print("MMYY")
elif b == 1:
  print("YYMM")
else:
  print("NA")
def solve():
    S = input()
    l = int(S[:2])
    r = int(S[2:])
    
    if l == 0 or r == 0:
        return 'NA'
    
    if 12 < l <= 20 and r <= 12:
        return 'YYMM'
    elif l <= 12 and 12 < r <= 20:
        return 'MMYY'
    elif l <= 12 and r <= 12:
        return 'AMBIGUOUS'
    else:
        return 'NA'

print(solve())
S = input()
S1 = int(S[:2])
S2 = int(S[2:])

if S1 == 0 or S2 == 0:
    print('NA')
elif S1 > 13 and S2 < 13:
    print('YYMM')
elif S1 < 13 and S2 > 13:
    print('MMYY')
else:
    print('AMBIGUOUS')
S = input()
s1,s2 = int(S[0:2]),int(S[2:4])

def f(s1):
  if s1 >= 1 and s1 <= 12:
    return True
  else:
    return False

if f(s1) and f(s2):
  print("AMBIGUOUS")
elif f(s1) and s2 > 12:
  print("MMYY")
elif f(s2) and s1 > 12:
  print("YYMM")
else:
  print("NA")
s = input()
s1 = int(s[:2])
s2 = int(s[2:])
if((s1 <= 99)and(s1 != 0))and((s2 <= 12)and(s2 != 0)):
    if(((s1 <= 12)and(s1 != 0))and((s2 <= 99)and(s2 != 0))):
        print("AMBIGUOUS")
    else:
        print("YYMM")
elif(((s1 <= 12)and(s1 != 0))and((s2 <= 99)and(s2 != 0))):
    if((s1 <= 99)and(s1 != 0))and((s2 <= 12)and(s2 != 0)):
        print("AMBIGUOUS")
    else:
        print("MMYY")
else:
    print("NA")
S = input()
YYMM = 0
MMYY = 0
start = S[0:2]
end = S[2:4]
tmp1 = int(start)
tmp2 = int(end)
print(tmp1,tmp2)
if(tmp2 <= 12 and tmp2 != 0):
    YYMM = 1
if(tmp1 <= 12 and tmp1 != 0):
    MMYY = 1
if(YYMM == 1 and MMYY == 1):
    print("AMBIGUOUS")
elif(YYMM == 1):
    print("YYMM")
elif(MMYY == 1):
    print("MMYY")
else:
    print("NA")
s=input()
f=int(s[:2])
b=int(s[2:4])

if (f>=13 or f==00)and b>=13 :
    print('NA')
elif (f>=13 or f==00)and 1<=b<=12 :
    print('YYMM')
elif 1<=f<=12 and (b>=13 or b==00) :
    print('MMYY')
else:
    print('AMBIGUOUS')
s = input()
a = int(s[:2])
b = int(s[2:])

if a > 12 and b > 12:
  print("NA")
elif a > 12 or b > 12:
  if a <= 12:
    print("MMYY")
  else:
    print("YYMM")
else:
  print("AMBIGUOUS")
S=input()
A=int(S[0:2])
B=int(S[2:4])
if 1<=A<=12:
    if 1<=B<=12:
        ans="AMBIGUOUS"
    elif 12<=B:
        ans="MMYY"
    else:
        ans="NA"
elif 12<=A:
    if 1<=B<=12:
        ans="YYMM"
    else:
        ans="NA"
else:
    ans="NA"
print(ans)
s = str(input())
A = int(s[0:2]); B = int(s[2:4])
if 1 <= A <= 12 and 0 <= B <= 12:
    print("AMBIGUOUS")
elif 1 <= A <= 12 and 0 <= B <= 99:
    print("MMYY")
elif 1 <= B <= 12 and 0 <= A <= 99:
    print("YYMM")
else:
    print("NA")
n=int(input())
a2=n%100
a1=n//100

if 0<a1 and a1<=12 and a2<=12 and a2>0:
			print("AMBIGUOUS")
elif a1<=12 and a2>0:
		print("YYMM")

elif a1<=12 and a1>0:
	print("MMYY")		

else:
	print("NA")
S = input()
F = int(S[:2])
L = int(S[2:])

if (F >= 13 and L >= 13) or (F == 0) or (L == 0):
    print('NA')
elif F >= 13:
    print('YYMM')
elif L >= 13:
    print('MMYY')
else:
    print('AMBIGUOUS')
num = input()
if int(num[:2]) > 12 or int(num[2:])==0:
    if int(num[2:]) > 12 or int(num[2:])== 0:
        print('NA')
    else:
        print('YYMM')
else:
    if int(num[2:]) > 12 or int(num[2:])== 0:
        print('MMYY')
    else:
        print('AMBIGUOUS')
a, b, c = map(int, input().split())

ans = 0

while True:
    if ans > 999999:
        print(-1)
        break
    elif a % 2 != 0 or b % 2 != 0 or c % 2 != 0:
        print(ans)
        break
    a, b, c =  (b+c) // 2, (a+c) // 2, (a+b) // 2
    ans += 1
a, b, c = map(int, input().split())
cnt = 0
while a%2==0 and b%2==0 and c%2==0:
  if a==b==c:
    print(-1)
    exit()
  a, b, c = b//2+c//2, a//2+c//2, a//2+b//2
  cnt += 1
print(cnt)
A, B, C = list(map(int, input().split()))
cookies = set()
cookies.add((A, B, C))

a = A
b = B
c = C

count = 0
while a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
    count += 1
    a = a // 2
    b = b // 2
    c = c // 2
    
    a2 = b + c
    b2 = a + c
    c2 = b + c
    if (a2, b2, c2) in cookies:
        count = -1
        break
    a = a2
    b = b2
    c = c2
    cookies.add((a, b, c))
print(count)
A,B,C = map(int, input().split())
n = 0
while A % 2 == 0 and B % 2 == 0 and C % 2 == 0:
  if A == B == C:
    print ('-1')
    exit()
  else:
    a = B/2 + C/2
    b = A/2 + C/2
    c = A/2 + B/2
    A = a
    B = b
    C = c
    n += 1
  
  
print(n)
a, b, c = map(int, input().split())

if a == b == c and a % 2 == 0:
	print(-1)
else:
	cnt = 0
	for _ in range(10**5):
		if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
			print(cnt)
			break
		else:
			a, b, c = (b + c) / 2, (c + a) / 2, (a + b) / 2
			cnt += 1
A, B, C = map(int, input().split())
if A == B == C:
    print(0 if A%2 else -1)
else:
    cnt = 0
    while A%2==0 and B%2==0 and C%2==0:
        A, B, C = (B+C)//2, (C+A)//2, (A+B)//2
        cnt += 1
    print(cnt)
a, b, c = map(int, input().split())

i = 0
while True:
    if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
        print(i)
        break
    elif a == b == c:
        print(-1)
        break
    a_h = a / 2
    b_h = b / 2
    c_h = c / 2
    a = b_h + c_h
    b = a_h + c_h
    c = a_h + b_h
    i += 1
A,B,C = map(int, input().split())

ans = 0
for _ in range(10**6):
    if A%2 == 1 or B%2 == 1 or C%2 == 1:
        break
    a = (B+C)//2
    b = (C+A)//2
    c = (A+B)//2
    A = a
    B = b
    C = c
    ans += 1

if ans == 10**6:
    ans = -1
print(ans)
a,b,c=list(map(int,input().split()))
n=0
H=[]
while True:
  S=[a,b,c]
  if S in H:
    print("-1")
    exit()
  H.append(S)
  if a%2!=0 or b%2!=0 or c%2!=0:
    print(n)
    exit()
  else:
    A=a/2
    B=b/2
    C=c/2
    a=int(B+C)
    b=int(A+C)
    c=int(A+B)
    n+=1
a, b, c = map(int, input().split())
cnt = 0
if a % 2 != 0 or b % 2 != 0 or c % 2 != 0:
  print(0)
  exit()
if a == b and b == c:
  print(-1)
  exit()
while cnt >= 0:
  if a % 2 != 0 or b % 2 != 0 or c % 2 != 0:
    print(cnt)
    exit()
  else:
    a1 = (b + c) // 2
    b1 = (a + c) // 2
    c1 = (a + b) // 2
    a = a1
    b = b1
    c = c1
    cnt += 1
print(cnt)
*a,=map(int,input().split())
b=[bin(a[i+1]-a[i])[::-1].find('1')for i in (0,1)]
print((max(b) if b[0]*b[1]<0 else min(b))*(1-sum(a)%2))
A, B, C = map(int, input().split())
res = 0
while True:
    if A%2 + B%2 + C%2 > 0:
        break
    A, B, C = B//2 + C//2, C//2 + A//2, A//2 + B//2
    if A == B and B == C:
        res = -1
        break
    res += 1
print(res)
#!/usr/bin/env python3

import sys
sys.setrecursionlimit(10**6)

def solve(a,b,c,counter=0):
    if a % 2 != 0 or b % 2 != 0 or c % 2 != 0:
        return counter
    elif a == b == c: 
        return -1
    else:
        return solve((b+c)//2,(c+a)//2,(a+b)//2,counter+1)


def main():
    A, B, C = map(int,input().split())
    print(solve(A,B,C))

if __name__ == '__main__':
    main()
a,b,c = map(int,input().split())

count=0
while a%2==0 and b%2==0 and c%2==0:
    if (b/2+c/2)==(a/2+c/2)==(a/2+b/2):
        count=-1
        break
    a,b,c = b/2+c/2,a/2+c/2,a/2+b/2
    count+=1
print(count)
a, b, c = map(int, input().split())

flag = 0
ans = 0

if a == b == c and a%2 == 0:
  ans = -1

else:
  while flag == 0:
    if a%2 == 0 and b%2 == 0 and c%2 == 0:
      a_tmp = (b+c)/2
      b_tmp = (a+c)/2
      c_tmp = (a+b)/2
      
      a = a_tmp
      b = b_tmp
      c = c_tmp
      
      ans += 1
      
    else:
      flag = 1

print(ans)
def exchg(a, b, c):
	count = 0
	if (a == b == c) and ((a & 1) == 0 and (b & 1) == 0 and (c & 1) == 0):
		return -1
	while((a & 1) == 0 and (b & 1) == 0 and (c & 1) == 0):
		a, b, c = (a+b)//2, (b+c)//2, (c+a)//2
		# print(a, b, c)
		count += 1
	return count
a, b, c = map(int, input().split())
print(exchg(a, b, c))
a, b, c = map(int, input().split())
if a == b and b == c:
    if a % 2 == 0:
        print(-1)
    else:
        print(0)
else:
    count = 0
    while a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
        a, b, c = (b + c) // 2, (c + a) // 2, (a + b) // 2
        count += 1
    print(count)
a, b, c = map(int, input().split())
t = 0

if a == b == c:
  if a % 2 == 1:
    print(t)
  else:
    print(-1)

else:
  while (a % 2 + b % 2 + c % 2) == 0:
    a, b, c = (b + c) / 2, (a + c) / 2, (a + b) / 2
    t += 1

  print(t)
A, B, C = map(int, input().split())

if A == B == C and A%2 == B%2 == C%2 == 0:
    print(-1)
else:
    ans = 0
    while A%2 == B%2 == C%2 == 0:
        A, B, C = (B+C)//2, (C+A)//2, (A+B)//2
        ans += 1
    print(ans)
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

def f(a, b, c):
    if (a%2 != 0) | (b%2 != 0) | (c%2 != 0):
        return 0
    if (a == b) & (b == c):
        return -1
    return f((b+c)//2, (a+c)//2, (a+b)//2) + 1
def main():
    a, b, c = map(int, readline().split())
    print(f(a, b, c))
if __name__ == '__main__':
    main()
import sys
a, b, c = map(int, input().split())
var = 0
for i in range(1000):
    if a%2 != 0 or b%2 != 0 or c%2 != 0:
        print(var)
        sys.exit()
    a, b, c = b/2 + c/2, a/2 + c/2, a/2 + b/2
    var += 1
print(-1)
A,B,C= map(int, input().split())
cot = 0
while True:
    if A % 2 == 1 or B % 2 == 1 or C % 2 == 1:
        break
    else:
        tempA = (B + C)//2
        tempB = (A + C)//2
        tempC = (B + A)//2
        A = tempA
        B = tempB
        C = tempC
        cot += 1

        if cot > 1000000:
            print(-1)
            exit(0)
            
print(cot)
cnt=0
a,s,d=map(int,input().split())
if a==s==d:
    if a%2==0:print(-1)
    else:print(0)
    exit()
while a%2==s%2==d%2==0:
    a,s,d=(s+d)//2,(a+d)//2,(a+s)//2
    cnt+=1
print(cnt)
A, B, C = map(int, input().split())
if A % 2 == 0 and A == B and B == C:
    print(-1)
    exit()

count = 0
while (A % 2, B % 2, C % 2) == (0, 0, 0):
    A, B, C = (B + C) // 2, (A + C) // 2, (A + B) // 2
    count += 1

print(count)
a, b, c = map(int, input().split())
if a == b == c:
    ans = 0
else:
    ans = 1 << 31
    for x in [a - b, b - c, c - a]:
        if x != 0:
            tmp = 0
            while x % 2 == 0:
                tmp += 1
                x >>= 1
            ans = min(tmp, ans)

if a == b == c and b % 2 == 0:
    print(-1)
else:
    print(ans)
A, B, C = map(int, input().split())

if any(map(lambda x: x % 2 == 1, (A, B, C))):
    print(0)
elif A == B == C:
    print(-1)
else:
    count = 0
    while True:
        A, B, C = B // 2 + C // 2, A // 2 + C // 2, A // 2 + B // 2
        count += 1
        if any(map(lambda x: x % 2 == 1, (A, B, C))):
            break
    print(count)
a, b, c = map(int, input().split())
res = 0
if a == b and a == c and a % 2 == 0:
    print(-1)
else:
    while 10 > 0:
        if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
            break
        a1 = a//2
        b1 = b//2
        c1 = c//2
        a = b1+c1
        b = a1+c1
        c = a1+b1
        res += 1
    print(res)
def is_no_odd(x, y, z):
    return x % 2 == 0 and y % 2 == 0 and z % 2 == 0


def exchange(x, y, z):
    new_x = y / 2 + z / 2
    new_y = x / 2 + z / 2
    new_z = x / 2 + y / 2
    return new_x, new_y, new_z


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

while is_no_odd(a, b, c):
    if a == b == c:
        cnt = -1
        break

    a, b, c = exchange(a, b, c)
    cnt += 1

print(cnt)
a,b,c = tuple(map(int,input().split()))

ans = 0
while True:
  if len(set((a,b,c)))==1:
    if a%2==1:
      print(0)
      exit()
    print(-1)
    exit()
  if a%2==0 and b%2==0 and c%2==0:
    a,b,c = b//2+c//2,c//2+a//2,a//2+b//2
    ans+=1
  else:
    break
print(ans)
a,b,c=map(int,input().split())
count=0
if a==b==c and a%2==0:
    print(-1)
    exit()
while a%2==0 and b%2==0 and c%2==0:
    A=a//2
    B=b//2
    C=c//2
    a=B+C
    b=C+A
    c=A+B
    count+=1
print(count)
def main():
    a, b, c = map(int, input().split())
    if a == b and b == c:
        print(-1 if a % 2 == 0 else 0)
        return
    cnt = 0
    for i in range(10 ** 9):
        if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
            break
        a, b, c = (b + c) // 2, (a + c) // 2, (a + b) // 2
        cnt += 1
    print(cnt)


if __name__ == '__main__':
    main()
A, B, C = [int(i) for i in input().split()]
t, a, s = [A, B, C]
ans = 0


while A % 2 == 0 and B % 2 == 0 and C % 2 == 0:
    if A == B == C:
        ans = -1
        break
    t = B / 2 + C / 2
    a = A / 2 + C / 2
    s = A / 2 + B / 2
    A = t
    B = a
    C = s
    ans += 1

print(ans)
a = list(map(int,input().split()))
cna = cnb = 0
a.sort()
x = a[2]-a[1]
y = a[1]-a[0]
if a[0]*a[1]*a[2]%2 != 0:
    print(0)
    exit()
while True:
    if x%2 == 0 and x != 0:
        cna += 1
        x //= 2
    else:
        break
while True:
    if y%2 == 0 and y != 0:
        cnb += 1
        y //= 2
    else:
        break
if cna == 0 and cnb == 0:
    print(-1)
else:
    print(min(cna,cnb))
a,b,c = map(int,input().split())

if (a%2!=0) or (b%2!=0) or (c%2!=0):
  print(0)
elif (a == b ) and (b == c):
  print(-1)
else:
  def exchange(a,b,c):
    return (b+c)/2,(c+a)/2,(a+b)/2
  num = 0
  ans = 0
  while num  == 0:
    a,b,c = exchange(a,b,c)
    ans += 1
    for j in range(3):
      if [a,b,c][j] % 2 ==1:
        num = 1
  print(ans)
A, B, C = map(int, input().split())
S = A+B+C

k = 0
flag = 0
while k<100:
    if A%2==1 or B%2==1 or C%2==1 or min([A,B,C])<1:
        flag = 1
        break
    An = (B + C)//2
    Bn = (A + C)//2
    Cn = (B + A)//2
    A = An 
    B = Bn 
    C = Cn         
    k += 1

if not flag:
    k = -1

print(k)
A,B,C=map(int,input().split())
ans=0

if A%2!=0 or B%2!=0 or C%2!=0:
      pass
elif A==B and B==C:
  ans=-1
else:
  while True:
    if A%2!=0 or B%2!=0 or C%2!=0:
      break

    A,B,C=B/2+C/2,A/2+C/2,A/2+B/2
    ans+=1

print(ans)
a,b,c=map(int,input().split())
if a==b==c and a%2==0 and b%2==0 and c%2==0:
    print(-1)
else:
    ans=0
    while a%2==0 and b%2==0 and c%2==0:
        A=a
        B=b
        C=c
        a=B//2+C//2
        b=A//2+C//2
        c=B//2+A//2
        ans+=1
        if a==b==c:
            ans=-1
            break
    print(ans)
def func(A, B, C):
    if A % 2 == 1 or B % 2 == 1 or C % 2 == 1:
        return 0
    if A == B and B == C:
        return -1
    return func((B+C)//2, (C+A)//2, (A+B)//2) + 1


A, B, C = map(int, input().split())

ans = func(A, B, C)

print(ans)
# 適当に10**5ぐらい回して無限に続けられたら-1でよくね？
A, B, C = map(int, input().split())


def update(A, B, C):
    return B // 2 + C // 2, C // 2 + A // 2, A // 2 + B // 2


for i in range(10 ** 5):
    if A & 1 or B & 1 or C & 1:
        print(i)
        exit()
    A, B, C = update(A, B, C)

print(-1)
A,B,C=map(int,input().split())

cnt=0
lp=0
ls=set()
a=A
b=B
c=C
ls.add((a,b,c))
while not(a%2==1 or b%2==1 or c%2==1 or lp==1):
    a=int((A+B+C-a)/2)
    b=int((A+B+C-b)/2)
    c=int((A+B+C-c)/2)
    cnt+=1
    if ((a,b,c) in ls):
        lp=1
if lp==1:
    print(-1)
else:
    print(cnt)
import sys

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))


a, b, c = rm()
if a == b == c:
  if a & 1:
    print(0)
  else:
    print(-1)
  exit()
cnt = 0
while a & 1 == 0 and b & 1 == 0 and c & 1 == 0:
  a, b, c = (b+c)//2, (a+c)//2, (a+b)//2
  cnt += 1
print(cnt)
a,b,c = list(map(int, input().strip().split()))
f=0
if a%2==1 or b%2==1 or c%2==1:
    print(f)
elif a==b and b==c:
    f=-1
    print(f)
else:
    while a%2==0 and b%2==0 and c%2==0:
        A=a
        B=b
        C=c
        a=B//2+C//2
        b=A//2+C//2
        c=A//2+B//2
        f=f+1
    else:
        print(f)
a,b,c=map(int,input().split());o=0
if a==b==c:print(a%2-1);exit()
while~-a*~-b*~-c%2:a,b,c=(b+c)//2,(c+a)//2,(a+b)//2;o+=1
print(o)
a,b,c = map(int,input().split())
if a % 2 == 0 and a == b == c:
    print(-1)
else:
    ans = 0
    while a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
        ab,bc,ac = a//2+b//2,b//2+c//2,a//2+c//2
        a,b,c = bc,ac,ab
        ans += 1
    print(ans)
import sys
input=sys.stdin.buffer.readline
A,B,C = map(int,input().split())

def F(A,B,C):
    if any(x&1 for x in [A,B,C]):
        return 0
    if A == B == C:
        return -1
    return 1 + F((A+B)//2,(B+C)//2,(C+A)//2)

answer = F(A,B,C)
print(answer)
a, b, c = map(int, input().split())
count=0
while a%2==0 and b%2==0 and c%2==0:
  ah=a//2
  bh=b//2
  ch=c//2
  a=bh+ch
  b=ch+ah
  c=ah+bh
  if a==b and a==c and a%2==0:
    count=-1
    break
  else:
    count+=1
print(count)
A, B, C = map(int, input().split())

cnt = 0

last = [A, B, C]

while A % 2 == 0 and B % 2 == 0 and C % 2 == 0:
    a = A // 2
    b = B // 2
    c = C // 2
    cnt += 1
    A = b + c
    B = a + c
    C = a + b
    if A in last and B in last and C in last:
        print(-1)
        exit()

    last = [A, B, C]

print(cnt)
a,b,c = map(int,input().split())
count = 0
while(True):
    if a%2 == 1 or b%2 == 1 or c%2 == 1:
        break
    a0 = a
    b0 = b
    c0 = c
    a = (b0+c0)/2
    b = (c0+a0)/2
    c = (a0+b0)/2
    count += 1
    if a0 == a and b0 == b and c0 == c:
        count = -1
        break
print(count)