#include <bits/stdc++.h>
using namespace std;
long long n, k, ar[1000004];
long long seg[4 * 1000004];
long long ans[4 * 1000004];
long long lazy[4 * 1000004];
vector<pair<long long, long long> > v;
void relax(long long low, long long high, long long pos) {
  if (lazy[pos] != 1e9 + 7) {
    ans[pos] = min(ans[pos], lazy[pos]);
    if (low != high) {
      lazy[pos * 2 + 1] = min(lazy[pos * 2 + 1], lazy[pos]);
      lazy[pos * 2 + 2] = min(lazy[pos * 2 + 2], lazy[pos]);
    }
    lazy[pos] = 1e9 + 7;
  }
  return;
}
void build(long long low, long long high, long long pos) {
  ans[pos] = 3 * n;
  lazy[pos] = 1e9 + 7;
  if (low == high) {
    seg[pos] = ar[low];
    return;
  }
  long long mid = (low + high) / 2;
  build(low, mid, pos * 2 + 1);
  build(mid + 1, high, pos * 2 + 2);
  seg[pos] = max(seg[pos * 2 + 1], seg[pos * 2 + 2]);
  return;
}
long long query(long long low, long long high, long long pos, long long slow,
                long long shigh) {
  if (low >= slow && high <= shigh) return seg[pos];
  if (low > shigh || high < slow) return 0;
  long long mid = (low + high) / 2;
  return max(query(low, mid, pos * 2 + 1, slow, shigh),
             query(mid + 1, high, pos * 2 + 2, slow, shigh));
}
long long descend(long long low, long long high, long long pos, long long shigh,
                  long long val) {
  if (high <= shigh) {
    if (low == high) {
      if (seg[pos] <= val) return -1;
      return low;
    }
    long long mid = (low + high) / 2;
    if (seg[pos * 2 + 2] <= val)
      return descend(low, mid, pos * 2 + 1, shigh, val);
    else
      return descend(mid + 1, high, pos * 2 + 2, shigh, val);
  }
  if (low > shigh) return -1;
  long long mid = (low + high) / 2;
  return max(descend(low, mid, pos * 2 + 1, shigh, val),
             descend(mid + 1, high, pos * 2 + 2, shigh, val));
}
void update(long long low, long long high, long long pos, long long shigh,
            long long val) {
  relax(low, high, pos);
  if (high <= shigh) {
    ans[pos] = min(ans[pos], val);
    if (low != high) {
      lazy[pos * 2 + 1] = min(lazy[pos * 2 + 1], val);
      lazy[pos * 2 + 2] = min(lazy[pos * 2 + 2], val);
    }
    return;
  }
  if (low > shigh) return;
  long long mid = (low + high) / 2;
  update(low, mid, pos * 2 + 1, shigh, val);
  update(mid + 1, high, pos * 2 + 2, shigh, val);
  return;
}
long long getv(long long low, long long high, long long pos, long long slow) {
  relax(low, high, pos);
  if (low == high && low == slow) {
    return ans[pos];
  }
  if (low > slow || high < slow) return 0;
  long long mid = (low + high) / 2;
  return max(getv(low, mid, pos * 2 + 1, slow),
             getv(mid + 1, high, pos * 2 + 2, slow));
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n;
  long long maxi = -1e9 + 7;
  long long mini = 1e9 + 7;
  for (int i = 0; i < n; i++) {
    cin >> ar[i];
    ar[i + n] = ar[i];
    ar[i + 2 * n] = ar[i];
    maxi = max(maxi, ar[i]);
    mini = min(mini, ar[i]);
  }
  build(0, 3 * n, 0);
  if (mini * 2 >= maxi) {
    for (int i = 0; i < n; i++) cout << -1 << " ";
    return 0;
  }
  for (int i = 0; i < 3 * n; i++) {
    long long maxind = descend(0, 3 * n, 0, i, ar[i] * 2);
    if (maxind == -1) continue;
    update(0, 3 * n, 0, maxind, i);
  }
  for (int i = 0; i < n; i++) cout << getv(0, 3 * n, 0, i) - i << " ";
  return 0;
}
