#include <bits/stdc++.h>
using namespace std;
double pi = 2 * acos(0.0);
void solve() {
  long long int n, i = 3, p = 4, a = 1;
  cin >> n;
  n -= 1;
  while (n > 0) {
    if ((i * (i + 1)) / 2 > n) {
      break;
    } else {
      n -= ((i * (i + 1)) / 2);
      i += p;
      p *= 2;
      a++;
    }
  }
  cout << a << endl;
}
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    solve();
  }
  return 0;
}
