#include <bits/stdc++.h>
namespace solution {
class SolutionInterface {
 public:
  virtual int run() = 0;

 protected:
  virtual void pre_calc() {}
  virtual bool action() = 0;
  virtual void init(){};
  virtual bool input() { return false; };
  virtual void output(){};
  SolutionInterface() {}

 private:
};
}  // namespace solution
namespace solution {
class SolutionBase : public SolutionInterface {
 public:
  virtual int run() {
    pre_calc();
    while (action())
      ;
    return 0;
  }
};
}  // namespace solution
namespace solution {}
namespace solution {
using namespace std;
}
namespace solution {
const int SIZE = 2 * 100000 + 11;
const long long NONE = std::numeric_limits<long long>::min() / 10LL;
const long long MEMO_NONE = std::numeric_limits<long long>::min() / 5LL;
int n;
int A[SIZE];
bool visited[SIZE][3];
long long memo[SIZE][3];
long long results[SIZE];
}  // namespace solution
namespace solution {
class Solver {
 public:
  void solve() {
    for (int i = 1; i <= n - 1; i++) {
      A[1] = i;
      visited[1][1 + 1] = false;
      memo[1][1 + 1] = MEMO_NONE;
      results[i - 1] = run(1, 1);
    }
  }
  long long run(int x, int k) {
    if (x <= 0 || x > n) return 0;
    long long& res = memo[x][k + 1];
    if (res != MEMO_NONE) return res;
    if (visited[x][k + 1]) return res = NONE;
    visited[x][k + 1] = true;
    long long ret = run(x + k * A[x], -k);
    if (ret == NONE) return NONE;
    return res = ret + A[x];
  }

 private:
};
}  // namespace solution
namespace solution {
class Solution : public SolutionBase {
 public:
 protected:
  virtual bool action() {
    init();
    if (!input()) return false;
    solver.solve();
    output();
    return true;
  }
  void init() {
    for (int i = 0; i < SIZE; ++i) {
      for (int j = 0; j < 3; ++j) {
        memo[i][j] = MEMO_NONE;
        visited[i][j] = false;
      }
    }
  }
  bool input() {
    if (!(cin >> n)) return false;
    for (int i = 2; i <= n; ++i) cin >> A[i];
    return true;
  }
  void output() {
    for (int i = 0; i < n - 1; ++i) {
      if (results[i] == NONE) {
        cout << -1 << endl;
      } else {
        cout << results[i] << endl;
      }
    }
  }

 private:
  Solver solver;
};
}  // namespace solution
int main() { return solution::Solution().run(); }
