#include <bits/stdc++.h>
using namespace std;
const int MOD1 = 1e9 + 7;
const int MOD2 = 998244353;
const long long INF = 2 * 1e18;
const long double PI = 3.14159265358979323846;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long fpow(long long a, long long b, long long m) {
  if (!b) return 1;
  long long ans = fpow(a * a % m, b / 2, m);
  return (b % 2 ? ans * a % m : ans);
}
long long inv(long long a, long long m) { return fpow(a, m - 2, m); }
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n, ans = 0, cur = 1, cnt = 0;
    cin >> n;
    while (cnt <= n - ((1LL << cur) - 1) * (1LL << cur - 1)) {
      cnt += ((1LL << cur) - 1) * (1LL << cur - 1);
      cur++;
    }
    cout << cur - 1 << "\n";
  }
}
