#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 200100;
const int INF = 1 << 28;
int n;
int a[MAX_N];
bool used[MAX_N * 2];
int g[MAX_N * 2];
long long c[MAX_N * 2];
stack<int> s;
void solve() {
  int m = n + 1;
  fill(c, c + m * 2, -1);
  used[1] = used[m + 1] = true;
  g[1] = 0;
  g[m + 1] = m + 1;
  c[m + 1] = 0;
  for (int i = (2); i <= (n); i++) {
    int p = m + i;
    used[p] = true;
    s.push(p);
    while (true) {
      if (p < m) {
        p += a[p] + m;
        if (p >= 2 * m) break;
      } else {
        p -= a[p - m] + m;
        if (p <= 0) break;
      }
      if (used[p]) break;
      used[p] = true;
      s.push(p);
    }
    if (0 < p && p < 2 * m && used[p] && c[p] == -1) {
      while (!s.empty()) {
        int p = s.top();
        s.pop();
        g[p] = 0;
      }
    } else {
      long long cost = 0;
      int dest;
      if (0 < p && p < 2 * m && used[p]) {
        dest = g[p];
        cost = c[p];
      } else {
        dest = -1;
        cost = 0;
      }
      while (!s.empty()) {
        int p = s.top();
        s.pop();
        cost += (p < m) ? a[p] : a[p - m];
        c[p] = cost;
        g[p] = dest;
      }
      cout << endl;
    }
  }
  for (int i = (1); i <= (n - 1); i++) {
    int dest = g[m + i + 1];
    long long cost = c[m + i + 1] + i;
    if (dest == m + 1) {
      cost += i;
    } else if (dest == 0) {
      cost = -1;
    }
    cout << cost << endl;
  }
}
int main() {
  cin >> n;
  for (int i = (1); i <= (n - 1); i++) cin >> a[i + 1];
  solve();
  return 0;
}
