#include <bits/stdc++.h>
using namespace std;
template <class S, class T>
pair<S, T> operator+(const pair<S, T> &s, const pair<S, T> &t) {
  return pair<S, T>(s.first + t.first, s.second + t.second);
}
template <class S, class T>
pair<S, T> operator-(const pair<S, T> &s, const pair<S, T> &t) {
  return pair<S, T>(s.first - t.first, s.second - t.second);
}
template <class S, class T>
ostream &operator<<(ostream &os, pair<S, T> p) {
  os << "(" << p.first << ", " << p.second << ")";
  return os;
}
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
const long long inf = 1000000001;
const long long INF = (long long)1e18 + 1;
const long long MOD = 998244353;
const double pi = 3.14159265358979323846;
int dx[4] = {-1, 0, 1, 0}, dy[4] = {0, 1, 0, -1};
int dx2[8] = {1, 1, 0, -1, -1, -1, 0, 1}, dy2[8] = {0, 1, 1, 1, 0, -1, -1, -1};
struct P {
  int x, y, z, i;
  P() {}
  P(int x, int y, int z, int i) : x(x), y(y), z(z), i(i) {}
  bool operator<(const P &ot) const {
    pair<pair<int, int>, int> me = make_pair(pair<int, int>(x, y), z);
    pair<pair<int, int>, int> ai = make_pair(pair<int, int>(ot.x, ot.y), ot.z);
    return me < ai;
  }
};
vector<int> a;
class UnionFind {
 public:
  int n;
  vector<int> par;
  vector<int> ran;
  vector<int> num;
  vector<int> high;
  int g;
  UnionFind(int _n) {
    n = _n;
    g = n;
    par.resize(n);
    ran.resize(n);
    num.resize(n);
    high.resize(n);
    for (int i = 0; i < n; i++) {
      par[i] = i;
      ran[i] = 0;
      num[i] = 1;
      high[i] = a[i];
    }
  }
  int find(int x) {
    if (par[x] == x) {
      return x;
    } else {
      return par[x] = find(par[x]);
    }
  }
  void unite(int x, int y) {
    x = find(x);
    y = find(y);
    int numsum = num[x] + num[y];
    int highest = max(high[x], high[y]);
    if (x == y) {
      return;
    }
    if (ran[x] < ran[y]) {
      par[x] = y;
    } else {
      par[y] = x;
      if (ran[x] == ran[y]) {
        ran[x]++;
      }
    }
    num[x] = num[y] = numsum;
    high[x] = high[y] = highest;
    g--;
  }
  bool same(int x, int y) { return find(x) == find(y); }
};
pair<int, pair<int, int>> merge(pair<int, pair<int, int>> a,
                                pair<int, pair<int, int>> b) {
  return make_pair(max(a.first, b.first),
                   pair<int, int>(a.second.first, b.second.second));
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  ;
  int n;
  cin >> n;
  a.resize(n);
  int ma = 0, mi = inf;
  for (int i = 0; i < (n); i++) {
    cin >> a[i];
    chmin(mi, a[i]);
    chmax(ma, a[i]);
  }
  if (mi > (ma - 1) / 2) {
    for (int i = 0; i < (n); i++) {
      cout << -1 << " ";
    }
    cout << endl;
    return 0;
  }
  deque<pair<int, pair<int, int>>> xlr;
  int nokori = n;
  vector<int> end(n, -1);
  for (int _i = 0; _i < (3 * n); _i++) {
    int i = _i % n;
    if (xlr.size() == 0) {
      xlr.push_back(make_pair(a[i], pair<int, int>(_i, _i + 1)));
    } else {
      while (xlr.size() > 0) {
        int ma = xlr[0].first;
        pair<int, int> lr = xlr[0].second;
        if (a[i] <= (ma - 1) / 2) {
          for (int j = lr.first; j < lr.second; j++) {
            if (end[j % n] == -1) {
              end[j % n] = _i;
              nokori--;
            }
          }
          xlr.pop_front();
        } else {
          break;
        }
      }
      pair<int, pair<int, int>> now =
          make_pair(a[i], pair<int, int>(_i, _i + 1));
      while (xlr.size() > 0 and xlr.back().first <= a[i]) {
        now = merge(xlr.back(), now);
        xlr.pop_back();
      }
      xlr.push_back(now);
    }
    if (nokori == 0) break;
  }
  for (int i = 0; i < (n); i++) {
    cout << end[i] - i << " ";
  }
  cout << endl;
}
