5
1 8 1 7 9
 4
6 7 4 5
 5
36 37 6 18 36
 3
5 1 3
 200
2 1 1 1 2 1 2 1 1 1 2 1 2 2 2 1 1 2 1 2 1 1 1 2 2 1 2 1 1 2 1 1 1 2 1 1 2 2 2 2 2 2 2 2 2 2 1 2 2 1 2 1 2 2 1 1 2 2 2 2 2 2 2 1 1 1 2 1 2 2 1 1 2 1 2 2 2 1 2 1 1 1 2 1 1 2 2 1 2 2 1 2 2 1 1 2 1 1 1 1 1 2 2 1 1 2 1 2 2 2 1 2 1 1 1 2 2 1 2 2 2 1 1 2 1 2 2 1 2 2 2 1 1 2 2 1 2 1 1 2 2 1 2 1 2 1 2 2 2 1 1 2 2 1 1 2 1 1 1 2 2 2 1 2 2 2 1 2 1 1 1 1 2 1 2 1 2 1 1 1 2 2 2 1 2 1 1 2 2 1 1 1 1 1 2 2 2 1 2 2
 10
104105246720 52052623360 213207545282560 426415090565120 6354080 832841973760 26650943160320 6506577920 50832640 832841973760
 3
9 4 4
 10
3 3 3 3 3 3 3 3 3 3
 100
24 33 88 55 4 24 19 19 63 90 9 47 24 74 21 43 20 100 58 15 36 66 13 4 9 51 24 96 50 27 100 41 92 9 67 94 17 11 98 24 72 57 96 85 50 9 45 41 63 76 80 59 25 67 21 84 88 15 62 60 79 65 5 66 1 85 92 100 61 75 44 96 53 97 2 28 83 42 60 42 34 73 44 99 58 46 75 100 75 55 35 52 93 80 69 75 50 67 100 77
 200
1 2 1 2 2 1 2 2 2 1 1 1 2 2 1 2 2 1 2 1 1 2 1 2 1 2 2 1 2 2 1 2 1 2 1 2 1 2 2 1 1 1 1 2 1 1 2 2 1 2 1 1 2 2 2 1 2 1 1 1 1 1 1 1 2 1 2 2 2 2 2 2 1 1 1 2 2 2 2 2 1 2 1 2 1 2 2 2 1 1 1 1 2 1 1 1 2 2 1 2 1 1 1 2 2 1 1 2 1 2 1 2 1 1 1 2 2 2 1 1 1 2 2 2 1 2 1 2 2 1 2 2 2 1 1 1 1 1 2 2 2 2 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ays.sort;

public class Main {
	public static void main(String[] args) {
		if(new File("input.txt").exists())
			try {
				System.setIn(new FileInputStream("input.txt"));
			} catch (FileNotFoundException e1) {
				e1.printStackTrace();
			}
		new Thread(null, new Runnable() {
			public void run() {
				try {
					new Main().run();
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
		}, "kek", 1 << 23).start();
	}

	BufferedReader in;
	PrintWriter out;
	StringTokenizer st = new StringTokenizer("");
	
	
	void run() throws IOException {
		in = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(System.out);
		Locale.setDefault(Locale.US);
		solve();
		in.close();
		out.close();
	}
	int maxN = 2 * 1000 * 100;
	
	int stepSize = 0;
	int prev[][] = new int[2][maxN];
	MultiList g[] = new MultiList[2];
	int used[][] = new int[2][maxN];
	
	int a[] = new int[maxN];

	int linkPos[][] = new int[2][maxN];
	int linkState[][] = new int[2][maxN];
	
	int deltaYL[][] = new int[2][maxN];
	

	
	int deg[][] = new int[2][maxN];
	int n;
	int tick = 1;
	boolean atCycle[][] = new boolean[2][maxN];
	void solve() throws IOException{
		n = nextInt();
		g[0] = new MultiList(maxN, maxN);
		g[1] = new MultiList(maxN, maxN);
		fill(linkPos[0], -1);
		fill(linkPos[1], -1);
		stepSize = max(2, (int)(sqrt(n)));
//		stepSize = 20;
		for(int i = 1; i < n; i++){
			a[i] = nextInt();
			if(valid(i - a[i])){
				prev[0][i] = (i - a[i]);
				g[0].add(i - a[i], i);
				deg[0][i]++;
			} else 
				prev[0][i] = -1;

			if(valid(i + a[i])){
				prev[1][i] = (i + a[i]);
				g[1].add(i + a[i], i);
				deg[1][i]++;
			} else 
				prev[1][i] = -1;
		}
		for(int state = 0; state < 2; state++)
			for(int v = 0; v < n; v++)
				if(used[state][v] == 0){
					checkCyclic(state, v);
					tick++;
				}
		tick++;
		for(int state = 0; state < 2; state++)
			for(int i = 1; i < n; i++){
				if((atCycle[state][i] || deg[state][i] == 0) && used[state][i] != tick)
					dfs(i, 0, 0, state, -1, 0);
			}
//		if(used[1][0] != tick){
//			System.err.println("!!!!!!!!!!!!!!!!!!!");
//			dfs(0, 0, 0, 1, -1, 0);
//		}
		for(int start = 0; start < n - 1; start++){
			int cur = start + 1;
			int state = 0;
			tick++;
			
			int retY = start + 1;
//			System.err.println("start test = " + cur);
			while(valid(cur) && used[state][cur] != tick){
				used[state][cur] = tick;
//				System.err.print("|| " + state + " " + cur + "| " + retY);
//				System.err.print(" ||| " + linkPos[state][cur]);
				if(linkPos[state][cur] == -1){
//					System.err.println(" case1");
					retY += a[cur];
					if(state == 0)
						cur = cur - a[cur];
					else
						cur = cur + a[cur];
					state = 1 - state;
				} else {
					int ns = linkState[state][cur];
					int nc = linkPos[state][cur];
					retY += deltaYL[state][cur];
//					System.err.println(" case2 " + deltaYL[ns][nc] + " ??? " + ns + " " + nc);
					state = ns;
					cur = nc;
				}
			}
//			System.err.println("end with  = " + state + " " + cur);
			out.println(valid(cur) ? (-1) : retY);
		}
	}
	void checkCyclic(int state, int v){
		if(used[state][v] == tick){
//			System.err.println("okok " + state + " " + v);
			atCycle[state][v] = true;
			return;
		}
		if(used[state][v] != 0) return;
		used[state][v] = tick;
		
		int nstate = 1 - state;
		for(int j = g[nstate].head[v]; j != 0; j = g[nstate].next[j]){
			int nv = g[nstate].vert[j];
			checkCyclic(nstate, nv);
		}
	}
	void dfs(int v, int depth, int deY, int state, int checkPos, int checkState){
//		System.err.println("dfs " + state + " " + v + " || <= " + checkState + checkPos + " !!! " + depth + " omg? " + deY + " " + a[v]);
		linkPos[state][v] = checkPos;
		linkState[state][v] = checkState;
		deltaYL[state][v] = deY;
		if(used[state][v] == tick) return;
		used[state][v] = tick;
		int nstate = 1 - state;
		for(int j = g[nstate].head[v]; j != 0; j = g[nstate].next[j]){
			int nv = g[nstate].vert[j];
			if(depth < stepSize && checkPos != -1)
				dfs(nv, depth + 1, deY + a[nv], nstate, checkPos, checkState);
			else
				dfs(nv, 1, a[nv], nstate, v, state);
		}
	}
	
	boolean valid(int x){
		return x >= 0 && x < n;
	}
	
	class MultiList{
		int[] head, vert, next;
		int cnt;
		MultiList(int h, int s){
			s++;
			cnt = 1;
			head = new int[h];
			vert = new int[s];
			next = new int[s];
		}
		void add(int h, int v){
			vert[cnt] = v;
			next[cnt] = head[h];
			head[h] = cnt++;
		}
	}
	
	
	
	String nextToken() throws IOException{
		while(!st.hasMoreTokens())
			st = new StringTokenizer(in.readLine());
		return st.nextToken();
	}
	long nextLong() throws IOException{
		return Long.parseLong(nextToken());
	}
	int nextInt() throws IOException{
		return Integer.parseInt(nextToken());
	}
	double nextDouble() throws IOException{
		return Double.parseDouble(nextToken());
	}
}
