n = int(eval(input()))

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



ans = []

for i in range(n):

    c = 0

    while True:

        if a[i]%2 == 0:

            a[i] = a[i]/2

            c += 1

        else:

            ans.append(c)

            break

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

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



sum = 0

for num in a:

    sum = sum | num



ans = 0

for t in range(200):

    if sum & 1 == 0:

        sum = sum >> 1

        ans += 1

    else:

        break

print(ans)
n = int(eval(input()))
a = list(map(int, input().split()))
ans = []
for i in range(n):
    c = 0
    while True:
        if a[i] % 2 == 0:
            a[i] = a[i] / 2
            c += 1
        else:
            ans.append(c)
            break
print((min(ans)))

n = int(eval(input()))
a = list(map(int, input().split()))
sum = 0
for num in a:
    sum = sum | num
ans = 0
for t in range(200):
    if sum & 1 == 0:
        sum = sum >> 1
        ans += 1
    else:
        break
print(ans)

-ans = [] -for i in range(n): -    c = 0 -    while True: -        if a[i] % 2 == 0: -            a[i] = a[i] / 2 -            c += 1 -        else: -            ans.append(c) -            break -print((min(ans))) +sum = 0 +for num in a: +    sum = sum | num +ans = 0 +for t in range(200): +    if sum & 1 == 0: +        sum = sum >> 1 +        ans += 1 +    else: +        break +print(ans)