#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0), cin.tie(0);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int& x : a) cin >> x;
  a.resize(3 * n);
  for (int i = 0; i < (n); i++) a[i + 2 * n] = a[i + n] = a[i];
  stack<pair<int, int> > ms;
  vector<int> nx(3 * n);
  for (int i = (3 * n); i--;) {
    pair<int, int> alt = {a[i], i};
    while (ms.size() && ms.top() < alt) ms.pop();
    nx[i] = ms.size() ? ms.top().second : -1;
    ms.push(alt);
  }
  deque<pair<int, int> > mq;
  vector<int> ass(3 * n);
  for (int i = (3 * n); i--;) {
    int x = nx[i] > 0 ? ass[nx[i]] : -1;
    while (mq.size() && mq.front().first * 2 < a[i]) {
      x = mq.front().second;
      mq.pop_front();
    }
    if (i != 3 * n - 1)
      x = x < 0 ? ass[i + 1] : ass[i + 1] > 0 ? min(ass[i + 1], x) : x;
    ass[i] = x;
    pair<int, int> alt = {a[i], i};
    while (mq.size() && alt < mq.back()) mq.pop_back();
    mq.push_back(alt);
  }
  for (int i = 0; i < (n); i++) cout << (ass[i] < 0 ? -1 : ass[i] - i) << ' ';
}
