n = int(eval(input()))

a = [int(i) for i in input().split()]

ans = 10**10

for i in range(n):

	counter = 0

	while a[i] % 2 == 0:

		a[i] /= 2

		counter += 1

	if counter <= ans:

		ans = counter

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

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

counter = 0

breaker = 0

while True:

	for i in range(n):

		if A[i]%2 == 0:

			A[i] = A[i] // 2

		else:

			breaker = 1

	if breaker == 0:

		counter += 1

	else:

		break

print(counter)
n = int(eval(input()))
a = [int(i) for i in input().split()]
ans = 10**10
for i in range(n):
    counter = 0
    while a[i] % 2 == 0:
        a[i] /= 2
        counter += 1
    if counter <= ans:
        ans = counter
print(ans)

n = int(eval(input()))
A = list(map(int, input().split()))
counter = 0
breaker = 0
while True:
    for i in range(n):
        if A[i] % 2 == 0:
            A[i] = A[i] // 2
        else:
            breaker = 1
    if breaker == 0:
        counter += 1
    else:
        break
print(counter)

-a = [int(i) for i in input().split()] -ans = 10**10 -for i in range(n): -    counter = 0 -    while a[i] % 2 == 0: -        a[i] /= 2 +A = list(map(int, input().split())) +counter = 0 +breaker = 0 +while True: +    for i in range(n): +        if A[i] % 2 == 0: +            A[i] = A[i] // 2 +        else: +            breaker = 1 +    if breaker == 0: -    if counter <= ans: -        ans = counter -print(ans) +    else: +        break +print(counter)