#include <bits/stdc++.h>
using namespace std;
int n;
long long x[100100];
vector<pair<long long, int> > v;
long long dp[100100];
long long seg[100100 * 4];
int seg2[100100 * 4];
void build(int cr, int s, int e) {
  seg2[cr] = n + 10;
  if (s == e) {
    seg[cr] = x[s];
    return;
  }
  build(cr * 2, s, (s + e) / 2);
  build(cr * 2 + 1, (s + e) / 2 + 1, e);
  seg[cr] = min(seg[cr * 2], seg[cr * 2 + 1]);
  return;
}
int l, r;
int get1(int cr, int s, int e) {
  if (l > e || r < s) {
    return n + 100;
  }
  if (l <= s && e <= r) {
    return seg2[cr];
  }
  return min(get1(cr * 2, s, (s + e) / 2),
             get1(cr * 2 + 1, (s + e) / 2 + 1, e));
}
long long get2(int cr, int s, int e) {
  if (l > e || r < s) {
    return 1e12;
  }
  if (l <= s && e <= r) {
    return seg[cr];
  }
  return min(get2(cr * 2, s, (s + e) / 2),
             get2(cr * 2 + 1, (s + e) / 2 + 1, e));
}
void upd(int cr, int s, int e) {
  if (l > e || r < s) {
    return;
  }
  if (s == e) {
    seg2[cr] = s;
    return;
  }
  upd(cr * 2, s, (s + e) / 2);
  upd(cr * 2 + 1, (s + e) / 2 + 1, e);
  seg2[cr] = min(seg2[cr * 2], seg2[cr * 2 + 1]);
  return;
}
int take1(int cr) {
  int hi = n - 1, lo = 0, best = 1;
  while (hi >= lo) {
    int mid = (hi + lo) / 2;
    l = cr;
    r = min(n, mid + cr);
    long long d = get2(1, 1, n);
    if (d < (x[cr] + 1) / 2) {
      hi = mid - 1;
      continue;
    }
    if (mid + cr > n) {
      l = 1;
      r = mid + cr - n;
      d = min(d, get2(1, 1, n));
    }
    if (d < (x[cr] + 1) / 2) {
      hi = mid - 1;
      continue;
    } else {
      lo = mid + 1;
      best = max(best, mid + 1);
    }
  }
  return best;
}
int main() {
  cin >> n;
  memset(dp, -1, sizeof dp);
  long long a = 0, b = 1e12;
  for (int i = 1; i <= n; i++) {
    scanf("%lld", &x[i]);
    a = max(a, x[i]);
    b = min(b, x[i]);
    v.push_back(make_pair(x[i], i));
  }
  if ((a + 1) / 2 <= b) {
    for (int i = 0; i < n; i++) cout << -1 << ' ';
    return 0;
  }
  sort(v.begin(), v.end());
  build(1, 1, n);
  for (int i = n - 1; i >= 0; i--) {
    l = v[i].second;
    r = n;
    long long o = get1(1, 1, n);
    if (o <= n) {
      r = o - 1;
      long long p = get2(1, 1, n);
      if (p >= (v[i].first + 1) / 2) {
        l = v[i].second;
        r = v[i].second;
        dp[v[i].second] = dp[o] + o - v[i].second;
        upd(1, 1, n);
        continue;
      }
    } else {
      l = 1;
      r = v[i].second - 1;
      o = get1(1, 1, n);
      if (o <= n) {
        r = o - 1;
        long long p = get2(1, 1, n);
        l = v[i].second;
        r = n;
        p = min(p, get2(1, 1, n));
        if (p >= (v[i].first + 1) / 2) {
          l = v[i].second;
          r = v[i].second;
          dp[v[i].second] = dp[o] + o + n - v[i].second;
          upd(1, 1, n);
          continue;
        }
      }
    }
    dp[v[i].second] = take1(v[i].second);
    l = v[i].second;
    r = v[i].second;
    upd(1, 1, n);
  }
  for (int i = 1; i <= n; i++) cout << dp[i] << ' ';
  return 0;
}
