#include <bits/stdc++.h>
using namespace std;
int n;
vector<int> a;
vector<long long> memo;
long long solve(int x) {
  if (memo[x] != -2) return memo[x];
  memo[x] = -1;
  int x0 = x;
  long long y = 0;
  y += a[x];
  x += a[x];
  if (x > n) return memo[x0] = y;
  y += a[x];
  x -= a[x];
  if (x < 1)
    return memo[x0] = y;
  else if (x == 1)
    return memo[x0] = -1;
  long long tmp = solve(x);
  if (tmp == -1) return memo[x0] = -1;
  y += tmp;
  return memo[x0] = y;
}
int main() {
  cin >> n;
  a.resize(n + 1);
  for (int i = 2; i <= n; ++i) cin >> a[i];
  memo.assign(n + 1, -2);
  for (int i = 1; i < n; ++i) {
    a[1] = i;
    int x = 1;
    long long y = 0;
    y += a[x];
    x += a[x];
    y += a[x];
    x -= a[x];
    if (x < 1) {
      cout << y << endl;
      continue;
    }
    long long ret = solve(x);
    if (ret != -1) ret += y;
    cout << ret << endl;
  }
  return 0;
}
