N = int(eval(input()))

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

i = 0

while True:

  for a in As:

   if a % pow(2, (i+1)) != 0:

    break

  else:

    i += 1

    continue

  break



print(i)

N = int(eval(input()))

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

count = 0

div = 2

flag = False

while True:

  for a in A:

    if a % div != 0:

      flag = True

      break

  if flag:

    break

  else:

    count += 1

    div *= 2



print(count)

N = int(eval(input()))
As = list(map(int, input().split()))
i = 0
while True:
    for a in As:
        if a % pow(2, (i + 1)) != 0:
            break
    else:
        i += 1
        continue
    break
print(i)

N = int(eval(input()))
A = list(map(int, input().split()))
count = 0
div = 2
flag = False
while True:
    for a in A:
        if a % div != 0:
            flag = True
            break
    if flag:
        break
    else:
        count += 1
        div *= 2
print(count)

-As = list(map(int, input().split())) -i = 0 +A = list(map(int, input().split())) +count = 0 +div = 2 +flag = False -    for a in As: -        if a % pow(2, (i + 1)) != 0: +    for a in A: +        if a % div != 0: +            flag = True +    if flag: +        break -        i += 1 -        continue -    break -print(i) +        count += 1 +        div *= 2 +print(count)