Given a tree with N nodes (numbered 1 to N). For each valid i, the i-th node has a value of A[i] associated with it.
Your target is to handle the queries of the following 4 types -
For each query answer can be very large so print it MODULO 1000000007 (1e9 + 7).
Input -
Output-
For each query print a single integer denoting it's sum as described in the problem.
Constraints -
4 24 62 56 12 1 2 1 3 3 4 12 1 1 2 1 1 3 1 1 4 1 2 3 1 2 4 1 3 4 2 1 2 2 1 3 2 1 4 2 2 3 2 2 4 2 3 4