#include <bits/stdc++.h>
int read() {
  int f = 1, x = 0;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') x = x * 10 + c - '0', c = getchar();
  return f * x;
}
int max(int a, int b) { return a > b ? a : b; }
int min(int a, int b) { return a < b ? a : b; }
bool umax(int& a, int b) {
  if (b > a) return a = b, 1;
  return 0;
}
bool umin(int& a, int b) {
  if (b < a) return a = b, 1;
  return 0;
}
int abs(int x) { return x > 0 ? x : -x; }
struct ST {
  int f[19][300011], lg[300011];
  void build(int* arr, int n) {
    lg[1] = 0;
    for (int i = 2; i <= n; ++i) lg[i] = lg[i >> 1] + 1;
    for (int i = 1; i <= n; ++i) f[0][i] = arr[i];
    for (int i = 1; i <= lg[n]; ++i)
      for (int j = 1; j + (1 << i) - 1 <= n; ++j)
        f[i][j] = max(f[i - 1][j], f[i - 1][j + (1 << (i - 1))]);
  }
  int Query(int l, int r) {
    int k = lg[r - l];
    return max(f[k][l], f[k][r - (1 << k) + 1]);
  }
} maxv, lb;
int a[300011], f[300011];
int main() {
  int n = read();
  for (int i = 1; i <= n; ++i) a[i] = a[n + i] = a[n + n + i] = read();
  maxv.build(a, n + n + n);
  for (int i = 1; i <= n + n + n; ++i) {
    unsigned l = 0, r = i, mid;
    while (l < r) {
      mid = (l + r + 1) >> 1;
      if (a[i] < (maxv.Query(i - mid + 1, i) + 1) / 2)
        r = mid - 1;
      else
        l = mid;
    }
    f[i] = i - l + 1;
  }
  lb.build(f, n + n + n);
  for (int i = 1; i <= n; ++i) {
    unsigned l = 0, r = n + n + n - i + 1, mid;
    while (l < r) {
      mid = (l + r + 1) >> 1;
      if (lb.Query(i, i + mid - 1) > i)
        r = mid - 1;
      else
        l = mid;
    }
    if (l > n + n)
      printf("-1 ");
    else
      printf("%u ", l);
  }
}
