I see a pink boar and I want it painted black. Black boars look much more awesome and mighty than the pink ones. Since Jaggy became the ruler of the forest, he has been trying his best to improve the diplomatic relations between the forest region and the nearby ones.
Some other rulers, however, have requested too much in return for peace between their two regions, so he realized he has to resort to intimidation. Once a delegate for diplomatic relations of a neighboring region visits Jaggy’s forest, if they see a whole bunch of black boars, they might suddenly change their mind about attacking Jaggy. Black boars are really scary, after all.
Jaggy’s forest can be represented as a tree (connected graph without cycles) with _n_ vertices. Each vertex represents a boar and is colored either black or pink. Jaggy has sent a squirrel to travel through the forest and paint all the boars black. The squirrel, however, is quite unusually trained and while it traverses the graph, it changes the color of every vertex it visits, regardless of its initial color: pink vertices become black and black vertices become pink.
Since Jaggy is too busy to plan the squirrel’s route, he needs your help. He wants you to construct a walk through the tree starting from vertex 1 such that in the end all vertices are black. A walk is a sequence of vertices, such that every consecutive pair has an edge between them in a tree.
## Input
The first line of input contains integer _n_ (2 ≤ _n_ ≤ 200 000), denoting the number of vertices in the tree. The following _n_ lines contains _n_ integers, which represent the color of the nodes.
If the _i_\-th integer is 1, if the _i_\-th vertex is black and - 1 if the _i_\-th vertex is pink.
Each of the next _n_ - 1 lines contains two integers, which represent the indexes of the vertices which are connected by the edge. Vertices are numbered starting with 1.
## Output
Output path of a squirrel: output a sequence of visited nodes' indexes in order of visiting. In case of all the nodes are initially black, you should print 1. Solution is guaranteed to exist. If there are multiple solutions to the problem you can output any of them provided length of sequence is not longer than 107.
[samples]
## Note
At the beginning squirrel is at node 1 and its color is black. Next steps are as follows:
* From node 1 we walk to node 4 and change its color to pink.
* From node 4 we walk to node 2 and change its color to pink.
* From node 2 we walk to node 5 and change its color to black.
* From node 5 we return to node 2 and change its color to black.
* From node 2 we walk to node 4 and change its color to black.
* We visit node 3 and change its color to black.
* We visit node 4 and change its color to pink.
* We visit node 1 and change its color to pink.
* We visit node 4 and change its color to black.
* We visit node 1 and change its color to black.
**Definitions:**
- Let $ T = (V, E) $ be a tree with $ n $ vertices, where $ V = \{1, 2, \dots, n\} $.
- Each vertex $ i \in V $ has an initial color $ c_i \in \{-1, 1\} $, where $ c_i = 1 $ means black, $ c_i = -1 $ means pink.
- The squirrel starts at vertex $ 1 $.
- Each time the squirrel visits a vertex, its color is flipped: $ c_i \leftarrow -c_i $.
- The goal is to find a walk $ w = (v_1, v_2, \dots, v_k) $, with $ v_1 = 1 $, such that after traversing the walk, all vertices are black (i.e., final color of each vertex $ i $ is $ 1 $).
**Constraints:**
- The walk must be a valid path in the tree: for all $ 1 \leq j < k $, $ \{v_j, v_{j+1}\} \in E $.
- The length of the walk $ k \leq 10^7 $.
- The initial color of vertex $ 1 $ is given as $ c_1 $; the squirrel starts there and flips it upon visit.
**Objective:**
Find a walk $ w $ starting at vertex $ 1 $ such that, for every vertex $ i \in V $, the number of times $ i $ is visited in $ w $ has the same parity as $ 1 - c_i $ (i.e., if $ c_i = -1 $, it must be visited an odd number of times; if $ c_i = 1 $, it must be visited an even number of times — including zero).
**Note:** Since the tree is connected and the solution is guaranteed to exist, a valid walk can be constructed via a DFS-like traversal that ensures each pink node is flipped an odd number of times and each black node an even number of times. A standard approach is to perform a DFS from node 1, and upon returning from a subtree, flip the parent if needed — but since the squirrel must traverse edges, a practical method is to use a "Euler Tour" style walk: traverse the tree in DFS order, and whenever backtracking, include the parent again. This ensures every edge is traversed twice (once down, once up), and every non-root node is visited exactly twice (once when going down, once when coming up), while the root is visited once more than its degree.
However, since the root (vertex 1) may need an odd number of visits if initially pink, we adjust accordingly.
**Formal Output Requirement:**
Output a sequence of vertex indices $ v_1, v_2, \dots, v_k $ such that:
- $ v_1 = 1 $,
- $ \forall j \in [1, k-1] $, $ \{v_j, v_{j+1}\} \in E $,
- For each $ i \in V $, the number of times $ i $ appears in the sequence $ \equiv (1 - c_i) \mod 2 $.
**Solution Construction (Implicit):**
Use a DFS traversal from vertex 1. For each child, recursively traverse the subtree, and upon returning from a child, append the current node again. This ensures that every node (except possibly the root) is visited an even number of times (twice per subtree). The root is visited once initially, and then once for each child return. If the root is initially pink ($ c_1 = -1 $), then the number of visits must be odd — which is naturally satisfied if the root has at least one child (since it will be visited $ 1 + \text{deg}(1) $ times). If the root is black ($ c_1 = 1 $), we need even visits — so if $ \text{deg}(1) $ is odd, we may need to append an extra visit to a neighbor and back (but the problem guarantees a solution exists, and the standard DFS backtracking already ensures parity correctness).
Thus, the algorithm is:
1. Build the tree as an adjacency list.
2. Perform a DFS starting at node 1.
3. For each node $ u $, append $ u $ to the walk.
4. For each child $ v $ of $ u $ (in any order), recursively process $ v $, then append $ u $ again after returning.
5. The resulting walk will have the correct parity for all nodes.
**Final Output:**
The sequence of vertices visited during this DFS-with-backtracking walk.
This walk has length at most $ 2n - 1 $, well under $ 10^7 $.
---
**Formal Output (as required):**
A walk $ w = (v_1, v_2, \dots, v_k) $, where $ v_1 = 1 $, each consecutive pair is adjacent in the tree, and for each vertex $ i $, the number of times $ i $ appears in $ w $ is congruent to $ 1 - c_i \pmod{2} $.