#include <bits/stdc++.h>
using namespace std;
long long power(long long x, long long y) {
  long long res = 1;
  while (y > 0) {
    if (y & 1) res = res * x;
    y = y >> 1;
    x = x * x;
  }
  return res;
}
int getMid(int s, int e) { return s + (e - s) / 2; }
int MaxUtil(int* st, int ss, int se, int l, int r, int node) {
  if (l <= ss && r >= se) return st[node];
  if (se < l || ss > r) return -1;
  int mid = getMid(ss, se);
  return max(MaxUtil(st, ss, mid, l, r, 2 * node + 1),
             MaxUtil(st, mid + 1, se, l, r, 2 * node + 2));
}
int getMax(int* st, int n, int l, int r) {
  if (l < 0 || r > n - 1 || l > r) {
    printf("Invalid Input");
    return -1;
  }
  return MaxUtil(st, 0, n - 1, l, r, 0);
}
int constructSTUtil(int arr[], int ss, int se, int* st, int si) {
  if (ss == se) {
    st[si] = arr[ss];
    return arr[ss];
  }
  int mid = getMid(ss, se);
  st[si] = max(constructSTUtil(arr, ss, mid, st, si * 2 + 1),
               constructSTUtil(arr, mid + 1, se, st, si * 2 + 2));
  return st[si];
}
int* constructST(int arr[], int n) {
  int x = (int)(ceil(log2(n)));
  int max_size = 2 * (int)pow(2, x) - 1;
  int* st = new int[max_size];
  constructSTUtil(arr, 0, n - 1, st, 0);
  return st;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, i, mx, end, j, x, flag = 0, temp, var;
  cin >> n;
  int a[3 * n + 5];
  for (i = 0; i < n; i++) {
    cin >> a[i];
    a[i + n] = a[i + 2 * n] = a[i];
  }
  int* st = constructST(a, 3 * n);
  mx = a[0];
  if (mx & 1)
    temp = mx / 2 + 1;
  else
    temp = mx / 2;
  for (i = 1; i < 2 * n; i++) {
    if (a[i] < temp) {
      break;
    }
    if (a[i] > mx) {
      mx = a[i];
      if (mx & 1)
        temp = mx / 2 + 1;
      else
        temp = mx / 2;
    }
  }
  if (i == 2 * n) {
    for (i = 0; i < n; i++) cout << "-1 ";
    return 0;
  }
  cout << i << " ";
  end = i;
  for (i = 1; i < n; i++) {
    var = end - i;
    mx = getMax(st, 3 * n, i, end);
    if (mx & 1)
      temp = mx / 2 + 1;
    else
      temp = mx / 2;
    for (j = end; j < i + 2 * n; j++) {
      if (a[j] < temp) {
        break;
      }
      if (a[j] > mx) {
        mx = a[j];
        if (mx & 1)
          temp = mx / 2 + 1;
        else
          temp = mx / 2;
      }
    }
    if (j == i + 2 * n) break;
    cout << var + j - end << " ";
    end = j;
  }
  for (i; i < n; i++) cout << "-1 ";
  return 0;
}
