#include <bits/stdc++.h>
using namespace std;
auto clk = clock();
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const long long INF = 1e18L + 5;
const int d4i[4] = {-1, 0, 1, 0}, d4j[4] = {0, 1, 0, -1};
const int d8i[8] = {-1, -1, 0, 1, 1, 1, 0, -1},
          d8j[8] = {0, 1, 1, 1, 0, -1, -1, -1};
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long modexp(long long base, long long power) {
  if (base == 0) return 0ll;
  if (power == 0) return 1ll;
  long long res = 1;
  while (power) {
    if (power & 1) res = (res * base);
    base = (base * base);
    power /= 2;
  }
  return res;
}
void solve() {
  long long x;
  cin >> x;
  vector<long long> a;
  long long p = 2;
  while (p * p < 2 * INF) {
    long long ab = p - 1;
    ab = ab * (ab + 1) / 2;
    a.push_back(ab);
    p = p * 2;
  }
  for (long long i = 0, _n = (29); i < _n; i++) {
    a[i + 1] = a[i + 1] + a[i];
  }
  for (long long i = (30) - 1; i >= 0; i--) {
    if (x >= a[i]) {
      cout << i + 1 << '\n';
      return;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout << setprecision(11);
  long long t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
