#include <bits/stdc++.h>
using namespace std;
long long read() {
  long long x = 0, f = 0;
  char ch = getchar();
  while (!isdigit(ch)) f = ch == '-', ch = getchar();
  while (isdigit(ch)) x = (x << 1) + (x << 3) + (ch ^ 48), ch = getchar();
  return f ? -x : x;
}
template <class T>
void ckmax(T &x, const T &y) {
  if (x < y) x = y;
}
template <class T>
void ckmin(T &x, const T &y) {
  if (x > y) x = y;
}
long long absl(long long x) { return x < 0 ? -x : x; }
const int N = 100005 * 3;
int n;
int a[N];
int b[N];
int st[N][20], ts[N][20];
int Log[N];
int querymax(int L, int R) {
  int d = Log[R - L + 1];
  return max(st[L + (1 << d) - 1][d], st[R][d]);
}
int querymin(int L, int R) {
  int d = Log[R - L + 1];
  return min(ts[L + (1 << d) - 1][d], ts[R][d]);
}
int findmi(int i, int v) {
  int L = i, R = n * 3, ans = R + 1;
  while (L <= R) {
    int mid = (L + R) >> 1;
    if (querymin(i, mid) < v)
      R = mid - 1, ans = mid;
    else
      L = mid + 1;
  }
  return ans;
}
int findmx(int i, int v) {
  int L = i, R = n * 3, ans = R + 1;
  while (L <= R) {
    int mid = (L + R) >> 1;
    if (querymax(i, mid) >= v)
      R = mid - 1, ans = mid;
    else
      L = mid + 1;
  }
  return ans;
}
int main() {
  n = read();
  a[0] = 1e9;
  for (int i = (1); i <= (n); i++) a[i] = a[i + n] = a[i + n + n] = read();
  for (int i = (2); i <= (n * 3); i++) Log[i] = Log[i / 2] + 1;
  for (int i = (1); i <= (n * 3); i++) {
    st[i][0] = ts[i][0] = a[i];
    for (int j = (1); j <= (19); j++) {
      st[i][j] = st[i][j - 1];
      ts[i][j] = ts[i][j - 1];
      if (i - (1 << (j - 1)) > 0) {
        ckmax(st[i][j], st[i - (1 << (j - 1))][j - 1]);
        ckmin(ts[i][j], ts[i - (1 << (j - 1))][j - 1]);
      }
    }
  }
  b[n * 3 + 1] = n * 3 + 1;
  for (int i = (n * 3); i >= (1); i--) {
    b[i] = i;
    int mi = findmi(i, (a[i] + 1) / 2);
    int mx = findmx(i + 1, a[i]);
    if (mx < mi)
      b[i] = b[mx];
    else
      b[i] = mi - 1;
  }
  for (int i = (1); i <= (n); i++) {
    printf("%d ", b[i] - i >= n * 2 ? -1 : b[i] - i + 1);
  }
  return 0;
}
