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()))

ans = 100000

for i in range(len(A)):

    cnt = 0

    while A[i] % 2 == 0:

        A[i] /= 2

        cnt += 1

    # print(cnt)

    ans = min(ans, cnt)

print(ans)

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()))
ans = 100000
for i in range(len(A)):
    cnt = 0
    while A[i] % 2 == 0:
        A[i] /= 2
        cnt += 1
    # print(cnt)
    ans = min(ans, cnt)
print(ans)

-eval(input()) +N = int(eval(input())) -ans = 0 -while all(a % 2 == 0 for a in A): -    A = [a / 2 for a in A] -    ans += 1 +ans = 100000 +for i in range(len(A)): +    cnt = 0 +    while A[i] % 2 == 0: +        A[i] /= 2 +        cnt += 1 +    # print(cnt) +    ans = min(ans, cnt)