N = int(eval(input()))

i = 0

cou = 0

flag = 0

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

while True:

 for i in range(0,N):

  if int(list1[i]) % 2 == 0:

   flag += 1

 if flag == N:

  cou += 1

  list1  = list([int(num/2) for num in list1])

  flag = 0

 else:

  break

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

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

p_=[]

b=False

c=0

while b==False:

  p_=list([in_%2 for in_ in p])

  b = 1 in p_

  p=list([int(in_/2) for in_ in p])

  c+=1

print((c-1))
N = int(eval(input()))
i = 0
cou = 0
flag = 0
list1 = list(map(int, input().split()))
while True:
    for i in range(0, N):
        if int(list1[i]) % 2 == 0:
            flag += 1
    if flag == N:
        cou += 1
        list1 = list([int(num / 2) for num in list1])
        flag = 0
    else:
        break
print(cou)

n = int(eval(input()))
p = list(map(int, input().split()))
p_ = []
b = False
c = 0
while b == False:
    p_ = list([in_ % 2 for in_ in p])
    b = 1 in p_
    p = list([int(in_ / 2) for in_ in p])
    c += 1
print((c - 1))

-N = int(eval(input())) -i = 0 -cou = 0 -flag = 0 -list1 = list(map(int, input().split())) -while True: -    for i in range(0, N): -        if int(list1[i]) % 2 == 0: -            flag += 1 -    if flag == N: -        cou += 1 -        list1 = list([int(num / 2) for num in list1]) -        flag = 0 -    else: -        break -print(cou) +n = int(eval(input())) +p = list(map(int, input().split())) +p_ = [] +b = False +c = 0 +while b == False: +    p_ = list([in_ % 2 for in_ in p]) +    b = 1 in p_ +    p = list([int(in_ / 2) for in_ in p]) +    c += 1 +print((c - 1))