This is simplified version of the problem used on the original contest. The original problem seems to have too difiicult solution. The constraints for input data have been reduced.

Polycarp likes to play computer role-playing game «Lizards and Basements». At the moment he is playing it as a magician. At one of the last levels he has to fight the line of archers. The only spell with which he can damage them is a fire ball. If Polycarp hits the i-th archer with his fire ball (they are numbered from left to right), the archer loses a health points. At the same time the spell damages the archers adjacent to the i-th (if any) — they lose b (1 ≤ b < a ≤ 10) health points each.

As the extreme archers (i.e. archers numbered 1 and n) are very far, the fire ball cannot reach them. Polycarp can hit any other archer with his fire ball.

The amount of health points for each archer is known. An archer will be killed when this amount is less than 0. What is the minimum amount of spells Polycarp can use to kill all the enemies?

Polycarp can throw his fire ball into an archer if the latter is already killed.

Input

The first line of the input contains three integers n, a, b (3 ≤ n ≤ 10; 1 ≤ b < a ≤ 10). The second line contains a sequence of n integers — h1, h2, ..., hn (1 ≤ hi ≤ 15), where hi is the amount of health points the i-th archer has.

Output

In the first line print t — the required minimum amount of fire balls.

In the second line print t numbers — indexes of the archers that Polycarp should hit to kill all the archers in t shots. All these numbers should be between 2 and n - 1. Separate numbers with spaces. If there are several solutions, output any of them. Print numbers in any order.

Examples

Input

3 2 1
2 2 2


Output

3
2 2 2 

Input

4 3 1
1 4 1 1


Output

4
2 2 3 3

Difficulty: VERY_HARD

Solutions:
import sys

def main():
	(n, a, b) = map(int, sys.stdin.readline().strip().split())
	archers = list(map(int, sys.stdin.readline().strip().split()))
	temp = [0] * n
	shots = []
	shots_first = archers[0] // b + 1
	archers[0] -= shots_first * b
	archers[1] -= shots_first * a
	archers[2] -= shots_first * b
	shots_last = archers[n - 1] // b + 1
	archers[n - 1] -= shots_last * b
	archers[n - 2] -= shots_last * a
	archers[n - 3] -= shots_last * b
	min_shots = 10000

	def kill(current_archer, life_current, life_left):
		nonlocal temp, shots, min_shots
		next_archer = current_archer + 1
		min_shots_kill_left = life_left // b + 1 if life_left >= 0 else 0
		min_shots_kill_current = life_current // a + 1 if life_current >= 0 else 0
		min_shots_kill_right = archers[next_archer] // b + 1 if archers[next_archer] >= 0 else 0
		min_shots_kill_trio = max(min_shots_kill_left, min_shots_kill_current, min_shots_kill_right)
		accum_shots = sum(temp[:current_archer])
		if current_archer == n - 2:
			temp[n - 2] = min_shots_kill_trio
			accum_shots += min_shots_kill_trio
			if min_shots > accum_shots:
				min_shots = accum_shots
				shots = temp.copy()
			return
		life = life_current - min_shots_kill_left * a
		if (life // a + 1 if life >= 0 else 0) == (life // b + 1 if life >= 0 else 0):
			temp[current_archer] = min_shots_kill_left
			kill(next_archer, archers[next_archer] - min_shots_kill_left * b, life)
		else:
			for j in range(min_shots_kill_left, min_shots_kill_trio + 1):
				if accum_shots + j >= min_shots:
					break
				temp[current_archer] = j
				kill(next_archer, archers[next_archer] - j * b, life_current - j * a)
	kill(1, archers[1], archers[0])
	shots[1] += shots_first
	shots[n - 2] += shots_last
	min_shots += shots_first + shots_last
	sys.stdout.write(str(min_shots) + '\n')
	sys.stdout.write(' '.join((str(pos) for (pos, s) in enumerate(shots, start=1) for _ in range(s))) + '\n')
main()


(N, a, b) = [int(_) for _ in input().split()]
h = [int(_) for _ in input().split()]
t = h[-1] // b + 1
h[-1] -= t * b
h[-2] -= t * a
h[-3] -= t * b
import sys
res = [sys.maxsize, None]
cnt = [0] * N

def search(idx, cur):
	if idx == N - 1:
		y = h[idx - 1] // a + 1 if h[idx - 1] >= 0 else 0
		if cur + y < res[0]:
			res[0] = cur + y
			cnt[N - 2] += t + y
			res[1] = cnt[:]
		return
	x = h[idx - 1] // b + 1 if h[idx - 1] >= 0 else 0
	while cur + x < res[0]:
		h[idx - 1] -= x * b
		h[idx] -= x * a
		h[idx + 1] -= x * b
		cnt[idx] = x
		search(idx + 1, cur + x)
		h[idx - 1] += x * b
		h[idx] += x * a
		h[idx + 1] += x * b
		x += 1
search(1, t)
print(res[0])
s = []
for i in range(N):
	for _ in range(res[1][i]):
		s.append(str(i + 1))
print(' '.join(s))


(n, a, b) = map(int, input().split())
h = list(map(int, input().split()))
t = h[-1] // b + 1
h[-1] -= t * b
h[-2] -= t * a
h[-3] -= t * b
import sys
res = [sys.maxsize, None]
c = [0] * n

def search(i, cur):
	if i == n - 1:
		res[0] = cur
		c[n - 2] += t
		res[1] = c[:]
		return
	if h[i - 1] >= 0:
		x = h[i - 1] // b + 1
	else:
		x = 0
	while cur + x < res[0]:
		h[i - 1] -= x * b
		h[i] -= x * a
		h[i + 1] -= x * b
		c[i] = x
		search(i + 1, cur + x)
		h[i - 1] += x * b
		h[i] += x * a
		h[i + 1] += x * b
		x += 1
search(1, t)
print(res[0])
s = []
for i in range(n):
	for j in range(res[1][i]):
		s.append(str(i + 1))
print(' '.join(s))


def main():
	(n, a, b) = map(int, input().split())
	health = [0]
	health.extend(map(int, input().split()))
	target = [0] * len(health)

	def need(t, d):
		nonlocal health
		p = health[t]
		return p // d + 1 if p >= 0 else 0
	least_target = []
	least_thrown = sum(health)
	last_need = max(need(n - 1, a), need(n, b))

	def beat(left, sofar):
		nonlocal health, target, n, a, b, need
		nonlocal least_thrown, least_target, last_need
		if sofar >= least_thrown:
			return
		center = left + 1
		right = center + 1
		if right == n:
			m = max(need(left, b), last_need)
			thrown = sofar + m
			if thrown < least_thrown:
				least_thrown = thrown
				least_target = target[:]
				least_target[center] += m
			return
		must = need(left, b)
		for m in range(must, max(must, need(center, a)) + 1):
			ma = m * a
			mb = m * b
			health[left] -= mb
			health[center] -= ma
			health[right] -= mb
			target[center] += m
			beat(center, sofar + m)
			target[center] -= m
			health[right] += mb
			health[center] += ma
			health[left] += mb
	beat(1, 0)

	def target_sequence(targets):
		for (t, k) in enumerate(targets):
			if k:
				s = str(t)
				yield from (s for _ in range(k))
	if least_target:
		print(least_thrown)
		print(' '.join(target_sequence(least_target)))
	else:
		print(0)
		print()
main()


import math
(n, a, b) = map(int, input().split())
arr = list(map(int, input().split()))
res = []

def helper(idx, arr, path, memo):
	global res
	if len(res) != 0 and len(path) >= len(res):
		return
	if idx == len(arr) - 1:
		if len(res) == 0 or len(path) < len(res):
			res = path.copy()
		return
	status = str(idx) + ' '
	for val in arr:
		status += str(val) + ' '
	if status in memo:
		return
	else:
		memo.add(status)
	if idx == len(arr) - 2:
		cnt = max(arr[idx - 1] // b + 1, arr[idx] // a + 1, arr[idx + 1] // b + 1)
		path.extend([idx] * cnt)
		helper(idx + 1, arr, path, memo)
		if cnt > 0:
			del path[-cnt:]
	else:
		cnt = arr[idx - 1] // b + 1
		if cnt < 0:
			cnt = 0
		path.extend([idx] * cnt)
		arr[idx] -= cnt * a
		arr[idx - 1] -= cnt * b
		arr[idx + 1] -= cnt * b
		helper(idx + 1, arr, path, memo)
		while arr[idx] >= 0:
			arr[idx] -= a
			arr[idx - 1] -= b
			arr[idx + 1] -= b
			path.append(idx)
			cnt += 1
			helper(idx + 1, arr, path, memo)
		if cnt > 0:
			del path[-cnt:]
		arr[idx] += cnt * a
		arr[idx - 1] += cnt * b
		arr[idx + 1] += cnt * b
	return
memo = set()
helper(1, arr, [], memo)
ret = [x + 1 for x in res]
print(len(ret))
print(' '.join(map(str, ret)))