#include <bits/stdc++.h>
using namespace std;
int Set(int N, int pos) { return N = N | (1 << pos); }
int reset(int N, int pos) { return N = N & ~(1 << pos); }
bool check(int N, int pos) { return (bool)(N & (1 << pos)); }
inline int addmod(int x, int y) {
  return (x % 1000000007 + y % 1000000007) % 1000000007;
}
inline int submod(int x, int y) {
  return (x % 1000000007 - y % 1000000007 + 1000000007) % 1000000007;
}
inline int mulmod(int x, int y) {
  return (x % 1000000007 * 1LL * y % 1000000007) % 1000000007;
}
inline int nextSubMask(int i, int mask) { return (i - 1) & mask; }
template <typename T>
void we_r_done(T mssg) {
  cout << mssg;
  exit(0);
}
bool boro(int a, int b) { return (a / 2 + a % 2) > b; }
int main() {
  int n;
  while (scanf("%d", &n) == 1) {
    int n3 = n * 3;
    int a[3 + n3];
    int mn = 1e9 + 4, mx = -1;
    for (int i = 1; i <= n; i++) {
      scanf("%d", &a[i]);
      a[n + i] = a[n + n + i] = a[i];
      mn = min(mn, a[i]);
      mx = max(mx, a[i]);
    }
    if (boro(mx, mn) == false) {
      for (int i = 1; i <= n; i++) printf("-1 ");
      return 0;
    }
    vector<int> dp(n3 + 4, 0);
    priority_queue<pair<int, int> > pq;
    int done = 0;
    a[0] = 0;
    for (int i = 1; i <= n3; i++) {
      while (pq.size()) {
        pair<int, int> p = pq.top();
        if (boro(p.first, a[i]) == false) break;
        pq.pop();
        if (p.second < done) continue;
        dp[p.second] = i - p.second;
        done = p.second;
      }
      pq.push(pair<int, int>(a[i], i));
    }
    stack<int> stk;
    for (int i = n3 - 1; i; i--) {
      while (stk.size() && a[stk.top()] < a[i]) stk.pop();
      if (stk.size() && dp[i] == 0) dp[i] = dp[stk.top()] + stk.top() - i;
      if (dp[i]) stk.push(i);
    }
    for (int i = 1; i <= n; i++) {
      assert(dp[i] > 0);
      printf("%d ", dp[i]);
    }
    cout << endl;
  }
  return 0;
}
