#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 3e5 + 5;
int n, a[MAX_N];
int mx = -1, mn = 1e9;
int ans[MAX_N];
int q[MAX_N], inq[MAX_N];
int main() {
  memset(ans, 0, sizeof(ans));
  scanf("%d", &n);
  for (register int i = 1; i <= n; i++) {
    scanf("%d", &a[i]), a[i + n] = a[i + 2 * n] = a[i];
    mx = max(mx, a[i]), mn = min(mn, a[i]);
  }
  if (mx <= 2 * mn) {
    for (register int i = 1; i <= n; i++) printf("-1%c", i == n ? '\n' : ' ');
    return 0;
  }
  n *= 3;
  int st = 1, ed = 0;
  for (register int i = 1; i <= n; i++) {
    while (st <= ed && q[ed] < a[i]) ed--;
    q[++ed] = a[i];
    inq[ed] = i;
    while (q[st] > 2 * q[ed]) {
      ans[inq[st]] = i - inq[st];
      st++;
    }
  }
  for (register int i = n; i >= 1; i--)
    if (!ans[i]) ans[i] = ans[i + 1] + 1;
  n /= 3;
  for (register int i = 1; i <= n; i++)
    printf("%d%c", ans[i], i == n ? '\n' : ' ');
  return 0;
}
