#include <bits/stdc++.h>
using namespace std;
const int N = (int)2e6 + 7;
const int INF = (int)1e9 + 123;
const int dx[] = {-1, 0, 1, 0};
const int dy[] = {0, -1, 0, 1};
int n;
int a[N];
int val[N];
int bound[N];
int till[N];
vector<int> all;
int get(int x) { return lower_bound(all.begin(), all.end(), x) - all.begin(); }
int t[N];
int dp[N];
void build(int v = 1, int tl = 0, int tr = 3 * n) {
  if (tl == tr)
    t[v] = INF;
  else {
    int mid = (tl + tr) / 2;
    build(v + v, tl, mid);
    build(v + v + 1, mid + 1, tr);
    t[v] = INF;
  }
}
void upd(int pos, int val, int v = 1, int tl = 0, int tr = 3 * n) {
  if (tl == tr)
    t[v] = val;
  else {
    int mid = (tl + tr) / 2;
    if (pos <= mid)
      upd(pos, val, v + v, tl, mid);
    else
      upd(pos, val, v + v + 1, mid + 1, tr);
    t[v] = min(t[v + v], t[v + v + 1]);
  }
}
int get(int l, int r, int v = 1, int tl = 0, int tr = 3 * n) {
  if (tl > r || tr < l) return INF;
  if (l <= tl && tr <= r) return t[v];
  int mid = (tl + tr) / 2;
  return min(get(l, r, v + v, tl, mid), get(l, r, v + v + 1, mid + 1, tr));
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    all.push_back(a[i]);
    all.push_back((a[i] + 1) / 2);
  }
  sort(all.begin(), all.end());
  for (int i = 1; i <= 3 * n; i++) {
    if (i <= n) {
      val[i] = get(a[i]);
      bound[i] = get((a[i] + 1) / 2);
    } else {
      val[i] = val[i - n];
      bound[i] = bound[i - n];
    }
  }
  int mn = *min_element(a + 1, a + n + 1);
  int mx = *max_element(a + 1, a + n + 1);
  if (mn >= (mx + 1) / 2) {
    for (int i = 1; i <= n; i++) cout << -1 << ' ';
    return 0;
  }
  build();
  for (int i = 3 * n; i > 0; i--) {
    till[i] = get(0, bound[i] - 1);
    upd(val[i], i);
  }
  dp[3 * n] = till[3 * n];
  for (int i = 3 * n - 1; i > 0; i--) {
    dp[i] = min(till[i], dp[i + 1]);
  }
  for (int i = 1; i <= n; i++) cout << dp[i] - i << ' ';
  return 0;
}
