#include <bits/stdc++.h>
using namespace std;
long long P = 998244353;
int R = 1000000000;
inline long long pw(long long a, long long b) {
  long long r = 1;
  for (; b; b >>= 1, a = a * a % P)
    if (b & 1) r = r * a % P;
  return r;
}
int n, a[200005], root, lc[12800005], rc[12800005], cnt, val[12800005],
    t[200005], as[200005];
void insert(int& x, int l, int r, int v, int p) {
  if (!x) x = ++cnt;
  val[x] = v;
  if (l == r) return;
  int mid = l + r >> 1;
  if (p <= mid)
    insert(lc[x], l, mid, v, p);
  else
    insert(rc[x], mid + 1, r, v, p);
}
int ask(int x, int l, int r, int L, int R) {
  if (l == L && r == R) return val[x];
  int mid = L + R >> 1;
  if (r <= mid)
    return ask(lc[x], l, r, L, mid);
  else if (l > mid)
    return ask(rc[x], l, r, mid + 1, R);
  return min(ask(lc[x], l, mid, L, mid), ask(rc[x], mid + 1, r, mid + 1, R));
}
int main() {
  cin >> n, val[0] = 0x3f3f3f3f;
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]), a[i + n] = a[i];
  for (int i = (n << 1); i > n; i--) insert(root, 1, R, i, a[i]);
  for (int i = n; i; i--) {
    if (a[i] <= 2) {
      t[i] = 0x3f3f3f3f;
      insert(root, 1, R, i, a[i]);
      continue;
    }
    int val = ask(root, 1, (a[i] - 1) / 2, 1, R);
    t[i] = val;
    insert(root, 1, R, i, a[i]);
  }
  for (int i = n + 1; i <= n * 2; i++) t[i] = t[i - n] + n;
  int ans = 0x3f3f3f3f;
  for (int i = (n << 1); i > n; i--) ans = min(ans, t[i]);
  for (int i = n; i; i--) {
    ans = min(ans, t[i]);
    if (ans == 0x3f3f3f3f)
      as[i] = -1;
    else
      as[i] = ans - i;
  }
  for (int i = 1; i <= n; i++) printf("%d ", as[i]);
  return 0;
}
