#include <bits/stdc++.h>
using namespace std;
long long int a[200005], nval[200005][2];
bool visit[200005][2];
int n;
long long int dfs(int v, int dir = 1) {
  if (nval[v][dir] != 0) return nval[v][dir];
  int tempval = a[v];
  visit[v][dir] = 1;
  v += (dir == 0) ? a[v] : -a[v];
  if (v < 1 || v > n) return tempval;
  if (v == 1 && dir == 0 ||
      visit[v][(dir + 1) % 2] == 1 && nval[v][(dir + 1) % 2] <= 0)
    return -1;
  nval[v][(dir + 1) % 2] = dfs(v, (dir + 1) % 2);
  return (nval[v][(dir + 1) % 2] == -1) ? -1 : nval[v][(dir + 1) % 2] + tempval;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n;
  for (int i = 2; i <= n; i++) cin >> a[i];
  for (int i = 2; i <= n; i++) nval[i][1] = dfs(i);
  for (int i = 1; i <= n - 1; i++)
    cout << (nval[i + 1][1] == -1 ? -1 : nval[i + 1][1] + i) << '\n';
  return 0;
}
