#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10, MASK = 20 + 10;
int a[N], mini[2][N], r[N], dp[N], ans[N], rmq[N][MASK], n, mark[N];
int minElement(int st, int en) {
  int x = en - st + 1, z = 0;
  while (2 * (1 << z) <= x) z++;
  return min(rmq[st][z], rmq[en - (1 << z) + 1][z]);
}
void findAns(int x) {
  mark[x] = 1;
  if (dp[x] == -1) {
    if (r[x] == -1)
      ans[x] = -1;
    else {
      if (mark[r[x]] == 1)
        ans[x] = -1;
      else {
        if (mark[r[x]] == 0) findAns(r[x]);
        if (ans[r[x]] ^ -1)
          ans[x] = ans[r[x]] + (r[x] - x < 0 ? r[x] - x + n : r[x] - x);
        else
          ans[x] = -1;
      }
    }
  } else
    ans[x] = dp[x];
  mark[x] = 2;
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) a[i + n] = a[i];
  r[2 * n - 1] = -1;
  for (int i = 2 * n - 2; ~i; i--) {
    int x = i + 1;
    while (x ^ -1 && a[x] < a[i]) x = r[x];
    r[i] = x;
  }
  for (int i = 0; i < 2 * n; i++) rmq[i][0] = a[i];
  int cnt = 0;
  while ((1 << cnt) * 2 <= (2 * n)) cnt++;
  for (int j = 1; j <= cnt; j++) {
    for (int i = 0; i < 2 * n; i++)
      if (i + (1 << j) < 2 * n)
        rmq[i][j] = min(rmq[i][j - 1], rmq[i + (1 << (j - 1))][j - 1]);
  }
  for (int i = 0; i < n; i++)
    if (r[i] != -1) {
      if (minElement(i, r[i]) < (a[i] + 1) / 2) {
        int s = i, e = r[i] - 1;
        dp[i] = -1;
        while (s <= e) {
          int mid = (s + e) / 2;
          if (minElement(s, mid) < (a[i] + 1) / 2) {
            dp[i] = mid - i;
            e = mid - 1;
          } else
            s = mid + 1;
        }
      } else
        dp[i] = -1;
    } else
      dp[i] = -1;
  for (int i = 0; i < n; i++)
    if (r[i] >= n) r[i] -= n;
  for (int i = 0; i < n; i++)
    if (r[i] == i) r[i] = -1;
  for (int i = 0; i < n; i++)
    if (!mark[i]) findAns(i);
  for (int i = 0; i < n; i++) cout << ans[i] << " ";
  cout << "\n";
}
