There is a rich kingdom on the mainland, and the road structure of the whole mainland can be regarded as a rooted tree. The capital is located at node 1 as the root of the whole tree.
In the past, people lived in peace and contentment. However, with the evil monsters flooding the mainland, people are suffering. The king decided to send the army to hunt the monsters. Before that, the king sent out reconnaissance teams, to watch for monster traces, if found at a certain node, it meant that there was at least one monster in the subtree. After a period of searching, the reconnaissance team found some nodes with traces of the monster, we call the nodes with traces of the monster as markers.
However, the reconnaissance is still not over, and the reconnaissance team may make new discoveries, which may be the discovery of new markers, or it may be determined that the previous markers are false positives, that is, cancel the marking of a certain node. And you, as the brain of the Kingdom, your task is to update how many monsters at least when new discoveries emerge.
The first line of input contains 3 integers n, m, q, indicating the number of nodes of the tree, the number of markers at the beginning, and the number of new discoveries.
The next line contains n - 1 integers f2, f3... fn indicating the father of nodes.
The next line contains m integers a1, a2... am(ai ≤ n) indicating the nodes with markers at the beginning. Guarantee that if i ≠ j, ai ≠ aj.
Each of the following q lines contains 2 integers opt, x(x ≤ n). opt = 1, which mean marked node x; opt = 2, which mean cancel the marking of node x. Guarantee that if opt = 1, node x is not marked before it, if opt = 2, node x is marked before it.
It guaranteed that 1 ≤ n, m, q ≤ 1 × 106.
Output q + 1 lines, each line contains an integer. The first line indicates the minimum number of monsters possible before new discoveries emerge. The i + 1 line indicates the minimum number of monsters possible after the i - th new discoveries emerge.
8 3 4 1 1 2 2 3 3 4 2 6 8 1 3 1 7 2 3 2 6
2 2 3 3 2
The problem requires a large amount of input, please use the appropriate input method.