A young hero is starting his heroic life. A wise wizard gave him an easy first quest. During the quest the hero meets n magical creatures in a fixed order. To help him, the wizard handed him a list of n integers a1,a2,…,an.
- If ai is positive, the i-th creature is benevolent and gives the hero one magical item of type ai. The hero may keep several items of the same type.
- If ai is negative, the i-th creature is evil, and defeating it costs one magical item of type −ai. Every magical item is fragile and can be used only once.
- If ai is zero, the i-th creature is a unicorn. It gives the hero a magical item of any type he asks for, but only one item.
Decide whether the hero can defeat every enemy on the way and finish the quest. If he can, decide what to ask each unicorn for.