#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t, n;
  cin >> t;
  while (t--) {
    cin >> n;
    long long counter = 0;
    long long e = 0;
    for (int i = 0; i < (int)(1000000); ++i) {
      e = pow(2, i) + e;
      n -= e * (e + 1) / 2;
      if (n < 0) {
        cout << i << endl;
        break;
      }
    }
  }
  return 0;
}
