#include <bits/stdc++.h>
using namespace std;
const int N = 4e5 + 5;
const int LOG = 20;
int a[N];
int res[N];
int mx[LOG][N];
int n, m;
int max_range(int l, int r) {
  int k = log2(r - l + 1);
  return max(mx[k][l], mx[k][r - (1 << k) + 1]);
}
int find_last_greater(int till, int v) {
  int res = 0;
  int l = 1, r = till;
  while (l <= r) {
    int mid = l + r >> 1;
    if (max_range(mid, till) > v) {
      res = mid;
      l = mid + 1;
    } else {
      r = mid - 1;
    }
  }
  return res;
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  m = 4 * n;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  for (int i = n + 1; i <= m; ++i) a[i] = a[i - n];
  for (int i = 1; i <= m; ++i) mx[0][i] = a[i];
  for (int j = 1; j < LOG; ++j) {
    for (int i = 1; (i + (1 << j) - 1) <= m; ++i) {
      mx[j][i] = max(mx[j - 1][i], mx[j - 1][i + (1 << j - 1)]);
    }
  }
  for (int i = 1; i <= m; ++i) res[i] = m + 1;
  for (int i = 1; i <= m; ++i) {
    int j = find_last_greater(i - 1, a[i] * 2);
    if (j > 0) {
      res[j] = min(res[j], i);
    }
  }
  for (int i = m - 1; i >= 1; --i) {
    res[i] = min(res[i], res[i + 1]);
  }
  for (int i = 1; i <= n; ++i) {
    cout << (res[i] <= m ? res[i] - i : -1) << ' ';
  }
  cout << endl;
}
