The Bad Luck Island is inhabited by three kinds of species: *r* rocks, *s* scissors and *p* papers. At some moments of time two random individuals meet (all pairs of individuals can meet equiprobably), and if they belong to different species, then one individual kills the other one: a rock kills scissors, scissors kill paper, and paper kills a rock. Your task is to determine for each species what is the probability that this species will be the only one to inhabit this island after a long enough period of time.
The single line contains three integers *r*, *s* and *p* (1 ≤ *r*, *s*, *p* ≤ 100) — the original number of individuals in the species of rock, scissors and paper, respectively.
def dfs(veretex):
	global pr, a, b, n
	if veretex == n:
		pos = veretex
	else:
		pos = veretex + b[veretex]
	if pos - a[pos] <= 0:
		if dist[0] > dist[veretex] + 1:
			dist[0] = dist[veretex] + 1
			pr[0] = veretex
	else:
		for i in range(a[pos]+1):
			if dist[pos-i] > dist[veretex] + 1:
				dist[pos-i] = dist[veretex] + 1
				pr[pos-i] = veretex
				dfs(pos-i)


n = int(input())
a = [0]+list(map(int, input().split()))
b = [0]+list(map(int, input().split()))
pr = [-1] * (n+1)
dist = [10 ** 9] * (n+1)
dist[n] = 0
dfs(n)
if pr[0] == -1:
	print(-1)
else:
	e = 0
	ans = []
	while e != -1:
		ans.append(e)
		e = pr[e]
	ans.reverse()
	print(dist[0])
	for i in range(1, dist[0]+1):
		print(ans[i], end = " ")
	print()