length = int(eval(input()))

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

count = 0

loop = True

while True:

    for i in range(length):

        if num_li[i]%2 == 1:

            loop = False

            break

        else:

            num_li[i] /= 2

    if loop == False:

        break

    else:

        count += 1

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

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

count = 0

loop = True

while loop == True:

    for i in range(length):

        if num_li[i]%2 == 1:

            loop = False

            break

        else:

            num_li[i] /= 2

    if loop == True:

        count += 1

print(count)
length = int(eval(input()))
num_li = list(map(int, input().split()))
count = 0
loop = True
while True:
    for i in range(length):
        if num_li[i] % 2 == 1:
            loop = False
            break
        else:
            num_li[i] /= 2
    if loop == False:
        break
    else:
        count += 1
print(count)

length = int(eval(input()))
num_li = list(map(int, input().split()))
count = 0
loop = True
while loop == True:
    for i in range(length):
        if num_li[i] % 2 == 1:
            loop = False
            break
        else:
            num_li[i] /= 2
    if loop == True:
        count += 1
print(count)

-while True: +while loop == True: -    if loop == False: -        break -    else: +    if loop == True: