#include <bits/stdc++.h>
using namespace std;
int N, fin[300011];
pair<int, int> track[300011];
int dst(int a, int b) {
  if (b >= N) return N + 1;
  b += N;
  return (b - a) % N;
}
int main() {
  memset(fin, 0x7f, sizeof(fin));
  if (fopen("data.in", "r")) freopen("data.in", "r", stdin);
  cin >> N;
  for (int i = 0; i < N; i++) {
    cin >> track[i].first;
    track[i].second = i;
  }
  for (int i = N; i < 2 * N; i++) {
    track[i] = track[i - N];
    track[i].second = i;
  }
  for (int i = N; i < 3 * N; i++) {
    track[i] = track[i - N];
    track[i].second = i;
  }
  N *= 3;
  sort(track, track + N);
  set<int> pos;
  for (int i = N - 1, k = N - 1; i >= 0; i--) {
    while (k > i && track[k].first > track[i].first * 2)
      pos.insert(track[k--].second);
    if (pos.size()) {
      auto p1 = pos.lower_bound(track[i].second);
      auto p2 = --pos.end();
      if (p1 == pos.begin())
        p1 = p2;
      else
        p1--;
      fin[*p1] = min(fin[*p1], track[i].second);
    }
  }
  for (int i = N - 1; i >= 0; i--) {
    int nxt = (i + 1) % N;
    if (fin[nxt] > N) continue;
    if (fin[nxt] != i && (fin[i] > N || (dst(i, fin[nxt]) < dst(i, fin[i]))))
      fin[i] = fin[nxt];
  }
  for (int i = 0; i < N / 3; i++) {
    int x = min(dst(i, fin[i]), min(dst(i + N / 3, fin[i + N / 3]),
                                    dst(i + 2 * N / 3, fin[i + 2 * N / 3])));
    cout << (x == N + 1 ? -1 : x) << " ";
  }
  cout << endl;
}
