#include <iostream>
#include <vector>
#include <climits>
int main() {
const uint64_t bits = sizeof(uint64_t) * CHAR_BIT;
uint64_t i, n;
std::cin >> n;
std::vector<uint64_t> vec(n);
for (i = 0; i < n; ++i)
std::cin >> vec[i];
for (i = 0; i < n; ++i)
std::cout << (vec[i] ? bits - __builtin_clzl(vec[i]) : bits) << '\n';
}