#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  long long memo[200001];
  int a[200001];
  long long x, y;
  map<long long, long long> s;
  memset(memo, 0xFF, sizeof(memo));
  cin >> n;
  for (int i = 2; i <= n; ++i) cin >> a[i];
  for (int i = 1; i <= n - 1; ++i) {
    x = 1;
    y = 0;
    a[1] = i;
    s.clear();
    while (x > 0 && x <= n) {
      y += a[x];
      x += a[x];
      if (x > n) break;
      if (memo[x] != -1) {
        if (memo[x] == -2)
          y = -1;
        else
          y += memo[x];
        break;
      }
      if (s.find(x) != s.end()) {
        y = -1;
        break;
      }
      s[x] = y;
      y += a[x];
      x -= a[x];
    }
    for (map<long long, long long>::iterator it = s.begin(); it != s.end();
         ++it) {
      if (y == -1)
        memo[it->first] = -2;
      else
        memo[it->first] = y - it->second;
    }
    cout << y << endl;
  }
  return 0;
}
