You are given a rooted tree with vertices. The root of the tree is vertex .
For each vertex , you need to choose a number equal to either or . Such a choice of numbers will be called a coloring of the tree.
For each vertex , consider the unique path in the tree from vertex to vertex . Let be the sum of all numbers on this path, including vertices and .
A coloring is called correct if all numbers are pairwise distinct, that is, no two of them are equal.
Count the number of correct colorings of the tree.
Since the answer may be very large, output it modulo .