#include <bits/stdc++.h>
using namespace std;
const int maxn = 212345;
int n, a[maxn], nxt[maxn], en[maxn], ans[maxn], bits[maxn];
int st[maxn][20];
int query(int l, int r) {
  int k = bits[r - l + 1];
  return min(st[l][k], st[r - (1 << k) + 1][k]);
}
int main() {
  scanf("%d", &n);
  for (int(i) = (1); (i) <= (n); (i)++) scanf("%d", a + i);
  for (int(i) = (n + 1); (i) <= (n + n); (i)++) a[i] = a[i - n];
  int xx = 0;
  map<int, int> fi;
  for (int(i) = (1); (i) <= (2 * n); (i)++) {
    st[i][0] = a[i];
    if (!fi.count(a[i])) fi[a[i]] = i;
    while (1 << xx + 1 <= i) xx++;
    bits[i] = xx;
  }
  for (int(j) = (1); (j) <= (19); (j)++)
    for (int i = 1; i + (1 << j) - 1 <= n + n; i++)
      st[i][j] = min(st[i][j - 1], st[i + (1 << j - 1)][j - 1]);
  stack<int> s;
  for (int(i) = (1); (i) <= (2 * n); (i)++) {
    while (!s.empty() && a[s.top()] < a[i]) {
      nxt[s.top()] = i;
      s.pop();
    }
    s.emplace(i);
  }
  while (!s.empty()) {
    nxt[s.top()] = 2 * n + 1;
    s.pop();
  }
  for (int(i) = (1); (i) <= (2 * n); (i)++) {
    int lo = i, hi = nxt[i] - 1;
    while (lo < hi) {
      int mi = lo + hi + 1 >> 1;
      if (query(lo, mi) * 2 < a[i])
        hi = mi - 1;
      else
        lo = mi;
    }
    en[i] = lo == nxt[i] - 1 ? nxt[i] : lo;
  }
  ans[2 * n + 1] = -1;
  priority_queue<pair<int, int> > q;
  for (int(i) = (1); (i) <= (2 * n); (i)++) q.emplace(a[i], -i);
  while (!q.empty()) {
    auto now = q.top();
    q.pop();
    int i = -now.second;
    if (en[i] >= nxt[i]) {
      if (i != fi[now.first] && nxt[i] == 2 * n + 1) {
        if (ans[fi[now.first]] == -1)
          ans[i] = -1;
        else
          ans[i] = ans[fi[now.first]] + n;
      } else
        ans[i] = ans[nxt[i]];
    } else
      ans[i] = en[i];
  }
  for (int(i) = (1); (i) <= (n); (i)++)
    if (ans[i] != -1) ans[i] = ans[i] - i + 1;
  for (int(i) = (1); (i) <= (n); (i)++) printf("%d ", ans[i]);
}
