Given a tree with n vertices numbered 1 through n. The i-th edge connects Vertex ai and Vertex bi. Vertex i is painted in color ci (in this problem, colors are represented as integers).
Vertex x is said to be good when the shortest path from Vertex 1 to Vertex x does not contain a vertex painted in the same color as Vertex x, except for Vertex x itself.
Find all the good vertices.
The first line contains the number of vertices n (2≤n≤105). The second line contains colors c1,c2,...,cn (1≤ci≤105). Each of the next n−1 lines contains two integers ai and bi (1≤ai,bi≤n).
Print all good vertices as integers, in ascending order. Print each number on a separate line.