N = int(eval(input()))

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

count = 0

while all(a % 2 == 0 for a in A):

    A = [a / 2 for a in A]

    count += 1

print(count)
n = int(eval(input()))

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

ans = 0

while all(i % 2 == 0 for i in a):

  a = [i / 2 for i in a]

  ans += 1

print(ans)
N = int(eval(input()))
A = list(map(int, input().split()))
count = 0
while all(a % 2 == 0 for a in A):
    A = [a / 2 for a in A]
    count += 1
print(count)

n = int(eval(input()))
a = list(map(int, input().split()))
ans = 0
while all(i % 2 == 0 for i in a):
    a = [i / 2 for i in a]
    ans += 1
print(ans)

-N = int(eval(input())) -A = list(map(int, input().split())) -count = 0 -while all(a % 2 == 0 for a in A): -    A = [a / 2 for a in A] -    count += 1 -print(count) +n = int(eval(input())) +a = list(map(int, input().split())) +ans = 0 +while all(i % 2 == 0 for i in a): +    a = [i / 2 for i in a] +    ans += 1 +print(ans)