#include <bits/stdc++.h>
using namespace std;
constexpr int kInf = (1 << 28);
class Bit {
 public:
  Bit(int size) : bit_(size + 1, kInf) {}
  void Add(int num, int pos);
  int MinPos(int num) const;

 private:
  static int Lsb(int num) { return num & -num; }
  vector<int> bit_;
};
void Bit::Add(int num, int pos) {
  while (num < (int)bit_.size()) {
    bit_[num] = min(bit_[num], pos);
    num += Lsb(num);
  }
}
int Bit::MinPos(int num) const {
  int min_pos = bit_[0];
  while (num > 0) {
    min_pos = min(min_pos, bit_[num]);
    num -= Lsb(num);
  }
  return min_pos;
}
class RevBit {
 public:
  RevBit(int size) : bit_(size), size_(size) {}
  void Add(int num, int pos) { bit_.Add(TranslateNum(num), pos); }
  int MinPos(int num) const { return bit_.MinPos(TranslateNum(num)); }

 private:
  int TranslateNum(int num) const { return size_ - num + 1; }
  Bit bit_;
  int size_;
};
vector<int> Normalize(const vector<int> &vec) {
  vector<int> sorted(vec.begin(), vec.end());
  sort(sorted.begin(), sorted.end());
  sorted.erase(unique(sorted.begin(), sorted.end()), sorted.end());
  return sorted;
}
int Index(const vector<int> &vec, int num) {
  int index = -1;
  int power = (1 << 20);
  while (power > 0) {
    int next_index = index + power;
    power >>= 1;
    if (next_index < (int)vec.size() && vec[next_index] <= num) {
      index = next_index;
    }
  }
  return index;
}
bool Cycles(const vector<int> &coolness) {
  auto mini = *min_element(coolness.begin(), coolness.end());
  auto maxi = *max_element(coolness.begin(), coolness.end());
  return mini > (maxi - 1) / 2;
}
int FindLen(const vector<int> &coolness, int pos, const vector<int> &norm) {
  static unordered_map<int, int> memo;
  static Bit bit(norm.size());
  static RevBit rev_bit(norm.size());
  static bool first_time = true;
  static vector<int> next_lower(coolness.size(), kInf);
  static vector<int> next_higher(coolness.size(), kInf);
  if (first_time) {
    first_time = false;
    for (int i = coolness.size() - 1; i >= 0; i -= 1) {
      auto order = Index(norm, coolness[i]);
      auto lower_order = Index(norm, (coolness[i] - 1) / 2);
      auto higher_order = order;
      auto lower_pos = bit.MinPos(lower_order + 1);
      auto higher_pos = rev_bit.MinPos(higher_order + 1);
      next_lower[i] = lower_pos;
      next_higher[i] = higher_pos;
      bit.Add(order + 1, i);
      rev_bit.Add(order + 1, i);
    }
  }
  if (memo.find(pos) != memo.end()) {
    return memo[pos];
  }
  auto lower_pos = next_lower[pos];
  auto higher_pos = next_higher[pos];
  if (lower_pos < higher_pos) {
    memo[pos] = lower_pos - pos;
  } else {
    memo[pos] = FindLen(coolness, higher_pos, norm) + higher_pos - pos;
  }
  return memo[pos];
}
vector<int> Solve(vector<int> &coolness) {
  if (Cycles(coolness)) {
    return vector<int>(coolness.size(), -1);
  }
  auto norm = Normalize(coolness);
  int n = coolness.size();
  for (int i = n; i < 3 * n; i += 1) {
    coolness.push_back(coolness[i % n]);
  }
  vector<int> len(n, 0);
  for (int i = n - 1; i >= 0; i -= 1) {
    len[i] = FindLen(coolness, i, norm);
  }
  return len;
}
int main() {
  int n;
  cin >> n;
  vector<int> coolness(n);
  for (auto &c : coolness) {
    cin >> c;
  }
  auto res = Solve(coolness);
  for (const auto &num : res) {
    cout << num << " ";
  }
  cout << "\n";
  return 0;
}
