#include <bits/stdc++.h>
using namespace std;
const int mod = 998244353;
const int N = 2e5 + 10, M = 1e6 + 10;
long long f(long long x) {
  long long y = x + 1;
  if (x & 2)
    y /= 2;
  else
    x /= 2;
  return x * y;
}
void solve() {
  long long n;
  scanf("%lld", &n);
  long long x = 3, cnt = 1;
  n--;
  while (1) {
    long long t = f(x);
    if (t > n) break;
    cnt++;
    n -= t;
    x = (x << 1) + 1;
  }
  printf("%lld\n", cnt);
}
int main() {
  int t;
  cin >> t;
  while (t--) solve();
  return 0;
}
