#include <bits/stdc++.h>
using namespace std;
mt19937 rng(static_cast<unsigned int>(
    chrono::steady_clock::now().time_since_epoch().count()));
template <typename num_t>
inline void add_mod(num_t& a, const long long& b, const int& m) {
  a = (a + b) % m;
  if (a >= m) a -= m;
  if (a < 0) a += m;
}
template <typename num_t>
inline bool update_max(num_t& a, const num_t& b) {
  return a < b ? a = b, true : false;
}
template <typename num_t>
inline bool update_min(num_t& a, const num_t& b) {
  return a > b ? a = b, true : false;
}
template <typename num_t>
num_t gcd(num_t lhs, num_t rhs) {
  return !lhs ? rhs : gcd(rhs % lhs, lhs);
}
template <typename num_t>
num_t pw(num_t n, num_t k, const num_t& mod) {
  if (k == -1) k = mod - 2;
  num_t res = 1;
  for (; k > 0; k >>= 1) {
    if (k & 1) res = 1ll * res * n % mod;
    n = 1ll * n * n % mod;
  }
  return res % mod;
}
const int inf = 1e9 + 7;
const int mod = 1000000007;
const long long ll_inf = (long long)inf * inf + 7;
const int maxn = 500000 + 7;
int find_first_pos(vector<int>& temp, const vector<int>& a, int x) {
  if (temp.empty()) return inf;
  int lo = 0, hi = (int)(temp).size() - 1, found = inf;
  while (lo <= hi) {
    int mid = (lo + hi) >> 1;
    if (a[temp[mid]] * 2 < x) {
      found = temp[mid];
      lo = mid + 1;
    } else
      hi = mid - 1;
  }
  return found;
}
int find_first_max(vector<int>& temp, const vector<int>& a, int x) {
  if (temp.empty()) return inf;
  int lo = 0, hi = (int)(temp).size() - 1, found = inf;
  while (lo <= hi) {
    int mid = (lo + hi) >> 1;
    if (a[temp[mid]] >= x) {
      found = temp[mid];
      lo = mid + 1;
    } else
      hi = mid - 1;
  }
  return found;
}
int dist(int u, int v, int n) {
  if (u >= inf || v >= inf) return inf;
  if (u < v) return v - u;
  return v + n - u;
}
void solve() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int& x : a) cin >> x;
  vector<int> min_stack, max_stack;
  int first_index = 0;
  for (int i = 0; i < n; ++i)
    if (a[i] > a[first_index]) first_index = i;
  vector<long long> dp(n, 1);
  dp[first_index] = inf;
  for (int i = 0, j = (first_index + 1) % n; i < n; ++i, j = (j + 1) % n) {
    if (a[j] * 2 < a[first_index]) {
      dp[first_index] = i + 1;
      break;
    }
  }
  min_stack.push_back(first_index);
  max_stack.push_back(first_index);
  for (int i = 0, j = (first_index + n - 1) % n; i + 1 < n;
       ++i, j = (j + n - 1) % n) {
    int next_min = find_first_pos(min_stack, a, a[j]);
    int next_max = find_first_max(max_stack, a, a[j]);
    if (dist(j, next_max, n) <= dist(j, next_min, n)) {
      dp[j] = dp[next_max] + dist(j, next_max, n);
    } else {
      dp[j] = dist(j, next_min, n);
    }
    while (!max_stack.empty() && a[j] >= a[max_stack.back()])
      max_stack.pop_back();
    max_stack.push_back(j);
    while (!min_stack.empty() && a[j] <= a[min_stack.back()])
      min_stack.pop_back();
    min_stack.push_back(j);
  }
  for (int i = 0; i < n; ++i)
    if (dp[i] >= inf)
      cout << -1 << ' ';
    else
      cout << dp[i] << ' ';
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  const bool multiple_test = false;
  int test = 1;
  if (multiple_test) cin >> test;
  for (int i = 0; i < test; ++i) {
    solve();
  }
}
