t = int(input())
for i in range(t):
    n = int(input())
    bn = bin(n)
    num = bn.count('1', 0)
    if num == 1:
        print(bn.index('1'))
    else:
        print(-1)

0932709aafe018fbdca30243a8a51cffe38a0a89
<mask token>

<mask token>
for i in range(t):
    n = int(input())
    bn = bin(n)
    num = bn.count('1', 0)
    if num == 1:
        print(bn.index('1'))
    else:
        print(-1)

t = int(input())
for i in range(t):
    n = int(input())
    bn = bin(n)
    num = bn.count('1', 0)
    if num == 1:
        print(bn.index('1'))
    else:
        print(-1)
