#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimization("Ofast")
#pragma GCC optimization("unroll-loops")
#pragma GCC target("avx2,avx,fma")
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int i, n;
  cin >> n;
  vector<int> a(3 * n);
  int maxi = 0;
  int mini = 1e9 + 9;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    a[i + n] = a[i];
    a[i + 2 * n] = a[i];
    maxi = max(maxi, a[i]);
    mini = min(mini, a[i]);
  }
  if (maxi <= mini * 2) {
    for (i = 0; i < n; i++) cout << -1 << " ";
    return 0;
  }
  vector<int> smax;
  vector<int> smin;
  vector<int> ans(3 * n);
  for (i = 3 * n - 1; i >= 0; i--) {
    while (smax.size() && a[smax.back()] <= a[i]) smax.pop_back();
    while (smin.size() && a[smin.back()] >= a[i]) smin.pop_back();
    int l = 0;
    int h = smin.size() - 1;
    while (l <= h) {
      int mid = (l + h) / 2;
      if (a[smin[mid]] * 2 < a[i])
        l = mid + 1;
      else
        h = mid - 1;
    }
    int nxt = 3 * n;
    if (h >= 0) {
      nxt = min(nxt, smin[h]);
    }
    if (smax.size()) {
      nxt = min(nxt, ans[smax.back()]);
    }
    ans[i] = nxt;
    smin.push_back(i);
    smax.push_back(i);
  }
  for (i = 0; i < n; i++) cout << ans[i] - i << " ";
  return 0;
}
