Home Web Board ProblemSet Standing Status Statistics
long long输出请使用 %lld服务器的python版本为3.4
Problem E: Interesting tree

Problem E: Interesting tree

Time Limit: 2 Sec  Memory Limit: 256 MB
Submit: 5  Solved: 2
[Submit][Status][Web Board]

Description

Haha likes trees very much. Recently he discovered an interesting tree. The tree consists of n nodes numbered from 1 to n, each node i have an initial value 0. The root of the tree is node 1.

This tree has a special property: when a value val is added to a value of node i, for the all nodes in the subtree of i, if (deep[j] - deep[i]) % 2 == 0, add val to the value of j, otherwise add val - k * (deep[j] - deep[i]) to the value of j.

This tree supports two types of queries:

"1 x val k" — val is added to the value of node x;
"2 x" — print the current value of node x.

In order to help Haha understand the tree better, you must answer m queries of the preceding type.

Input

The first line contains two integers n and m (1 ≤ n, m ≤ 200000). Each of the next n–1 lines contains two integers vi and ui (1 ≤ vi, ui ≤ n), meaning that there is an edge between nodes vi and ui.

Each of the next m lines contains a query in the format described above. It is guaranteed that the following constraints hold for all queries: 1 ≤ x ≤ n, 1 ≤ val ,k≤ 1000.

Output

For each query of type two (print the value of node x) you must print the answer to the query on a separate line. The queries must be answered in the order given in the input.

Sample Input

5 5
1 2
1 3
2 4
2 5
1 2 3 1
1 1 2 2
2 1
2 2
2 5

Sample Output

2
3
4

HINT

[Submit][Status][Web Board]