#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse2")
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  std::cerr << name << " : " << arg1 << '\n';
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  std::cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
long long max(long long a, long long b) { return (a > b) ? a : b; }
long long min(long long a, long long b) { return (a < b) ? a : b; }
void amax(long long& a, long long b) { a = max(a, b) % 1000000007; }
void amin(long long& a, long long b) { a = min(a, b) % 1000000007; }
void inc(long long& a, long long b) { a = (a + b) % 1000000007; }
void dec(long long& a, long long b) { a = (a - b + 1000000007) % 1000000007; }
long long solve() {
  long long n;
  cin >> n;
  vector<long long> a(3 * n);
  for (long long i = 0; i < n; ++i) cin >> a[i];
  for (long long i = 0; i < n; i++) {
    a[i + n] = a[i + 2 * n] = a[i];
  }
  queue<long long> q1;
  set<long long> s;
  s.insert(0);
  map<long long, long long> m;
  long long last = 0;
  for (long long i = 0; i < n; i++) {
    long long flag = 1;
    for (; last < 3 * n; last++) {
      long long ma = *(s.rbegin());
      amax(ma, a[last]);
      if (a[last] * 2 < ma) {
        cout << last - i << " ";
        flag = 0;
        break;
      }
      q1.push(a[last]);
      m[a[last]]++;
      s.insert(a[last]);
    }
    if (flag) cout << -1 << " ";
    m[a[i]]--;
    if (m[a[i]] == 0) s.erase(a[i]);
    q1.pop();
  }
  return 0;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) {
    solve();
  }
}
