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 -