#include <bits/stdc++.h>
const long long int MOD = 1e9 + 7;
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int arr[300005], nge[300005], n;
int tree[4 * 300005];
void build(int node, int l, int r) {
  if (l == r)
    tree[node] = arr[l];
  else {
    int m = (l + r) / 2;
    build(2 * node, l, m);
    build(2 * node + 1, m + 1, r);
    tree[node] = min(tree[2 * node], tree[2 * node + 1]);
  }
}
int query(int node, int st, int en, int l, int r) {
  if (st > r || en < l) return INT_MAX;
  if (st >= l && en <= r) {
    return tree[node];
  } else {
    int mid = (st + en) / 2;
    return min(query(2 * node, st, mid, l, r),
               query(2 * node + 1, mid + 1, en, l, r));
  }
}
int fun(int limit, int l, int h) {
  int ans = h + 2;
  while (l <= h) {
    int mid = (l + h) / 2;
    int k = query(1, 1, 3 * n, l, mid);
    if (k < limit) {
      ans = mid;
      h = mid - 1;
    } else
      l = mid + 1;
  }
  return ans;
}
int dp[300005];
int solve(int indx) {
  if (dp[indx] != -1) return dp[indx];
  long long int limit = (arr[indx] + 1) / 2;
  int a = fun(limit, indx, 3 * n);
  if (nge[indx] > a) {
    dp[indx] = a - indx;
    return a - indx;
  } else {
    dp[indx] = nge[indx] - indx + solve(nge[indx]);
    return dp[indx];
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  memset(dp, -1, sizeof(dp));
  int mx = 0, mn = 2e9;
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> arr[i];
    mx = max(arr[i], mx);
    mn = min(arr[i], mn);
    arr[n + i] = arr[2 * n + i] = arr[i];
  }
  stack<int> stk;
  for (int i = 1; i <= 3 * n; ++i) {
    while (!stk.empty() && arr[stk.top()] < arr[i]) {
      nge[stk.top()] = i;
      stk.pop();
    }
    stk.push(i);
  }
  while (!stk.empty()) {
    nge[stk.top()] = 3 * n + 2;
    stk.pop();
  }
  if (mn * 2 >= mx) {
    for (int i = 1; i <= n; ++i) cout << -1 << " ";
    return 0;
  }
  build(1, 1, 3 * n);
  for (int i = 1; i <= n; ++i) {
    cout << solve(i) << " ";
  }
  return 0;
}
