#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:256000000")
using namespace std;
const int maxN = 201000;
int n;
int a[maxN];
pair<long long, int> dp[maxN][2];
int used[maxN][2];
pair<long long, int> dfs(int v, int move) {
  if (used[v][move] == 2) {
    used[v][move] = 1;
    return dp[v][move] = make_pair(-1, -1);
  }
  if (used[v][move] == 1) {
    return dp[v][move];
  }
  used[v][move] = 2;
  long long ch = a[v];
  int nv = v;
  if (move == 1) {
    nv -= a[v];
  } else {
    nv += a[v];
  }
  if (nv <= 0 || nv > n) {
    used[v][move] = 1;
    int val = 0;
    if (v == 1 && nv <= 0) ++val;
    return dp[v][move] = make_pair(ch, val);
  }
  pair<long long, int> val = dfs(nv, 1 - move);
  if (val.first == -1) {
    used[v][move] = 1;
    return dp[v][move] = make_pair(-1, -1);
  } else {
    used[v][move] = 1;
    return dp[v][move] = make_pair(ch + val.first, val.second);
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 2; i <= n; ++i) {
    scanf("%d", &a[i]);
  }
  a[0] = 1;
  used[1][0] = 2;
  for (int i = 2; i <= n; ++i) {
    dp[i][1] = dfs(i, 1);
  }
  for (int i = 1; i < n; ++i) {
    pair<long long, int> st = dp[i + 1][1];
    if (st.first == -1) {
      printf("%I64d\n", st.first);
    } else {
      printf("%I64d\n", st.first + (long long)(i) + (long long)st.second * i);
    }
  }
  return 0;
}
