#include <bits/stdc++.h>
using namespace std;
const double PI = 2.0 * acos(0.0);
const double EPS = 1e-6;
int a[200005];
bitset<200005> visit[2];
long long dp[2][200005];
int n;
long long DFS(int x, int dir) {
  if (x <= 0 || x > n) return 0LL;
  if (visit[dir][x]) return dp[dir][x] > 0 ? dp[dir][x] : -1;
  visit[dir][x] = true;
  long long res = DFS(x + (dir == 0 ? -a[x] : a[x]), dir ^ 1);
  if (res == -1)
    return dp[dir][x] = -1;
  else
    return dp[dir][x] = a[x] + res;
}
int main() {
  scanf("%d", &n);
  for (int i = 2; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 1; i < n; i++) {
    a[1] = i;
    visit[1][1] = false;
    dp[1][1] = 0LL;
    cout << DFS(1, 1) << endl;
  }
  return 0;
}
