N = int(eval(input()))

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

ans = 0

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

  A = [a/2 for a 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(a % 2 == 0 for a in A):
    A = [a / 2 for a 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)

-ans = 0 -while all(a % 2 == 0 for a in A): +count = 0 +while all([a % 2 == 0 for a in A]): -    ans += 1 -print(ans) +    count += 1 +print(count)