#include <bits/stdc++.h>
using namespace std;
class Node {
 public:
  Node *l, *r;
  int mini, s, e;
  Node(int a, int b) {
    mini = 0;
    l = NULL;
    r = NULL;
    s = a;
    e = b;
    if (s < e) {
      l = new Node(s, (s + e) / 2);
      r = new Node((s + e) / 2 + 1, e);
    }
  }
  void sett(int loc, int val) {
    if (s == e) {
      mini = val;
    } else {
      if (loc <= (s + e) / 2) {
        l->sett(loc, val);
      } else {
        r->sett(loc, val);
      }
      mini = min(l->mini, r->mini);
    }
  }
  int gmin(int st, int en) {
    if (st <= s && e <= en) {
      return mini;
    }
    int ret = 1000000042;
    if (st <= (s + e) / 2) {
      ret = min(ret, l->gmin(st, en));
    }
    if (en > (s + e) / 2) {
      ret = min(ret, r->gmin(st, en));
    }
    return ret;
  }
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  int a[n];
  int mini, maxi;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (i == 0) {
      mini = a[0];
      maxi = a[0];
    }
    mini = min(mini, a[i]);
    maxi = max(maxi, a[i]);
  }
  if (mini * 2 >= maxi) {
    for (int i = 0; i < n; i++) {
      cout << -1 << " ";
    }
    cout << endl;
    return 0;
  }
  Node *t1 = new Node(0, 3 * n - 1);
  for (int i = 0; i < n; i++) {
    t1->sett(i, a[i]);
    t1->sett(i + n, a[i]);
    t1->sett(i + 2 * n, a[i]);
  }
  int aft[3 * n];
  for (int i = 0; i < n; i++) {
    if (mini * 2 >= a[i]) {
      aft[i] = 3 * n;
    } else {
      int lo = i + 1;
      int hi = i + n;
      while (lo < hi) {
        int mid = (lo + hi) / 2;
        if (t1->gmin(i, mid) * 2 >= a[i]) {
          lo = mid + 1;
        } else {
          hi = mid;
        }
      }
      aft[i] = lo;
    }
    aft[i + n] = aft[i] + n;
    aft[i + 2 * n] = aft[i] + 2 * n;
  }
  for (int i = 0; i < 3 * n; i++) {
    t1->sett(i, aft[i]);
  }
  int p2 = 0;
  for (int i = 0; i < n; i++) {
    p2 = max(i, p2);
    while (t1->gmin(i, p2) > p2) {
      p2++;
    }
    cout << (p2 - i) << " ";
  }
  cout << endl;
}
