#include <bits/stdc++.h>
using namespace std;
long long F(long long n) {
  long long ret = (n * (n + 1)) / 2LL;
  return ret;
}
int main() {
  long long tc, n, x;
  scanf("%lld", &tc);
  for (long long cs = 1; cs <= tc; ++cs) {
    scanf("%lld", &x);
    long long now, left = x, tmp, i;
    for (i = 1;; i++) {
      tmp = (1LL << i) - 1;
      now = F(tmp);
      if (now <= left) {
        left -= now;
      } else {
        break;
      }
    }
    printf("%lld\n", i - 1);
  }
  return 0;
}
