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



for i in range(len(x)):

  if x[i] is 0:

    print((i+1))

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



for i in range(len(x)):

  if x[i] == 0:

    print((i+1))

x = list(map(int, input().split()))
for i in range(len(x)):
    if x[i] is 0:
        print((i + 1))

x = list(map(int, input().split()))
for i in range(len(x)):
    if x[i] == 0:
        print((i + 1))

-    if x[i] is 0: +    if x[i] == 0: