#include <bits/stdc++.h>
using namespace std;
const long double PI = 3.14159265358979323846;
const long long N = 100005;
vector<pair<long long, long long> > g[N];
long long ans[N], VIS[N];
void dfs(long long v) {
  VIS[v] = 1;
  for (auto u : g[v]) {
    if (!VIS[u.first]) {
      if (ans[v] == -1)
        ans[u.first] = -1;
      else {
        ans[u.first] = u.second + ans[v];
      }
      dfs(u.first);
    }
  }
}
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long tt = 1;
  for (long long ttt = 1; ttt <= (tt); ++ttt) {
    for (long long i = 0; i < (N); ++i) ans[i] = -1;
    long long n;
    cin >> n;
    vector<long long> a(2 * n);
    for (long long i = 0; i < (n); ++i) {
      cin >> a[i];
    }
    for (long long i = n; i <= (2 * n - 1); ++i) a[i] = a[i % n];
    vector<long long> mn(2 * n, (long long)(1e18)), mx(2 * n, -1);
    stack<long long> S1;
    S1.push(0);
    set<pair<long long, long long> > S2;
    S2.insert({a[0], 0});
    for (long long i = 1; i <= (2 * n - 1); ++i) {
      auto it = S2.lower_bound({2 * a[i] + 1, -1});
      vector<pair<long long, long long> > rm;
      for (; it != S2.end(); it++) {
        mn[it->second] = i;
        rm.push_back(*it);
      }
      for (long long j = 0; j < ((long long)((rm).size())); ++j)
        S2.erase(rm[j]);
      S2.insert({a[i], i});
    }
    for (long long i = 1; i <= (2 * n - 1); ++i) {
      while (!S1.empty() and a[i] >= a[S1.top()]) {
        mx[S1.top()] = i;
        S1.pop();
      }
      S1.push(i);
    }
    vector<long long> in(n, 0), out(n, 0);
    for (long long i = 0; i < (n); ++i) {
      if (mx[i] < mn[i]) {
        g[mx[i] % n].push_back({i, mx[i] - i});
        out[mx[i] % n]++;
        in[i]++;
      } else {
        ans[i] = mn[i] - i;
      }
    }
    for (long long i = 0; i < (n); ++i) {
      if (!in[i]) {
        dfs(i);
      }
    }
    for (long long i = 0; i < (n); ++i) cout << ans[i] << ' ';
    cout << '\n';
  }
}
