#include <bits/stdc++.h>
using namespace std;
const long long int MAXN = 2 * 100000 + 10, mod = 1000 * 1000 * 1000 + 7;
bool mrk[MAXN][2], flag, r_or_l;
long long int n, a[MAXN], childl[MAXN], childr[MAXN], par[MAXN][2],
    ans[MAXN][2];
void find_ans(int v, bool rl) {
  while (par[v][rl] != 0 && ans[par[v][rl]][rl] == 0) {
    if (ans[v][!rl] == -1)
      ans[par[v][rl]][rl] = -1;
    else
      ans[par[v][rl]][rl] = ans[v][!rl] + a[par[v][rl]];
    v = par[v][rl];
    rl = !rl;
  }
  return;
}
void dfs(int v) {
  if (flag) {
    mrk[v][r_or_l] = 1;
    if (r_or_l) {
      if (childr[v] < 1 || n < childr[v]) {
        flag = 0, ans[v][1] = a[v];
        find_ans(v, 0);
        return;
      } else if (mrk[childr[v]][0]) {
        if (ans[childr[v]][0] == -1 || ans[childr[v]][0] == 0) {
          flag = 0, ans[v][1] = -1;
          find_ans(v, 0);
          return;
        } else {
          flag = 0, ans[v][1] = ans[childr[v]][0] + a[v];
          find_ans(v, 0);
          return;
        }
      } else {
        par[childr[v]][1] = v;
        r_or_l = 0;
        return dfs(childr[v]);
      }
    } else {
      if (childl[v] < 1 || n < childl[v]) {
        flag = 0, ans[v][0] = a[v];
        find_ans(v, 1);
        return;
      } else if (mrk[childl[v]][1]) {
        if (ans[childl[v]][1] == -1 || ans[childl[v]][1] == 0) {
          flag = 0, ans[v][0] = -1;
          find_ans(v, 1);
          return;
        } else {
          flag = 0, ans[v][0] = ans[childl[v]][1] + a[v];
          find_ans(v, 1);
          return;
        }
      } else {
        par[childl[v]][0] = v;
        r_or_l = 1;
        return dfs(childl[v]);
      }
    }
  }
}
void dfs_all() {
  mrk[1][1] = 1, ans[1][1] = -1;
  for (int i = 2; i <= n; i++) {
    if (!mrk[i][1]) flag = 1, r_or_l = 1, dfs(i);
    if (!mrk[i][0]) flag = 1, r_or_l = 0, dfs(i);
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 2; i <= n; i++) {
    cin >> a[i];
    childl[i] = i - a[i], childr[i] = i + a[i];
  }
  dfs_all();
  for (int i = 2; i <= n; i++)
    if (ans[i][0] != -1)
      cout << i - 1 + ans[i][0] << endl;
    else
      cout << -1 << endl;
  return 0;
}
