Natasha travels around Mars in the Mars rover. But suddenly it broke down, namely — the logical scheme inside it. The scheme is an undirected tree (connected acyclic graph) with a root in the vertex $1$, in which every leaf (excluding root) is an input, and all other vertices are logical elements, including the root, which is output. One bit is fed to each input. One bit is returned at the output.

There are four types of logical elements: [AND](https://en.wikipedia.org/wiki/Logical_conjunction) ($2$ inputs), [OR](https://en.wikipedia.org/wiki/Logical_disjunction) ($2$ inputs), [XOR](https://en.wikipedia.org/wiki/Exclusive_or) ($2$ inputs), [NOT](https://en.wikipedia.org/wiki/Negation) ($1$ input). Logical elements take values from their direct descendants (inputs) and return the result of the function they perform. Natasha knows the logical scheme of the Mars rover, as well as the fact that only one input is broken. In order to fix the Mars rover, she needs to change the value on this input.

For each input, determine what the output will be if Natasha changes this input.
The first line contains a single integer $n$ ($2 \le n \le 10^6$) — the number of vertices in the graph (both inputs and elements).

The $i$-th of the next $n$ lines contains a description of $i$-th vertex: the first word "AND", "OR", "XOR", "NOT" or "IN" (means the input of the scheme) is the vertex type. If this vertex is "IN", then the value of this input follows ($0$ or $1$), otherwise follow the indices of input vertices of this element: "AND", "OR", "XOR" have $2$ inputs, whereas "NOT" has $1$ input. The vertices are numbered from one.

It is guaranteed that input data contains a correct logical scheme with an output produced by the vertex $1$.
10
AND 9 4
IN 1
IN 1
XOR 6 5
AND 3 7
IN 0
NOT 10
IN 1
IN 1
AND 2 8
10110
3
AND 2 3
IN 0
IN 0
00
3
AND 2 3
IN 1
IN 0
01
3
AND 2 3
IN 0
IN 1
10
3
AND 2 3
IN 1
IN 1
00
3
OR 2 3
IN 0
IN 0
11
3
OR 2 3
IN 1
IN 0
01
3
OR 2 3
IN 0
IN 1
10
3
OR 2 3
IN 1
IN 1
11
3
XOR 2 3
IN 0
IN 0
11
3
XOR 2 3
IN 1
IN 0
00
3
XOR 2 3
IN 0
IN 1
00
3
XOR 2 3
IN 1
IN 1
11
2
NOT 2
IN 0
0
2
NOT 2
IN 1
1
20
OR 17 10
IN 0
IN 0
NOT 6
OR 18 14
IN 1
OR 16 3
XOR 5 4
IN 0
XOR 11 9
NOT 15
AND 20 19
IN 0
IN 1
IN 1
NOT 8
NOT 12
IN 1
AND 13 7
NOT 2
11111111
30
XOR 4 11
XOR 6 25
NOT 29
NOT 9
NOT 17
NOT 26
NOT 30
NOT 27
NOT 14
IN 1
NOT 5
NOT 15
NOT 22
IN 0
NOT 24
IN 1
NOT 3
NOT 19
NOT 8
NOT 16
NOT 23
NOT 28
NOT 7
NOT 2
NOT 10
NOT 13
NOT 12
NOT 20
NOT 21
NOT 18
000
40
OR 9 2
AND 30 31
IN 1
IN 1
IN 0
OR 25 21
IN 1
XOR 20 10
AND 24 34
IN 0
IN 0
NOT 16
AND 14 4
IN 0
AND 18 27
IN 1
AND 15 22
OR 26 12
IN 1
AND 36 3
XOR 11 38
IN 1
IN 1
NOT 29
IN 0
XOR 32 13
IN 1
IN 0
NOT 8
IN 1
XOR 37 39
XOR 7 23
IN 1
XOR 33 5
IN 0
OR 40 28
IN 1
IN 0
AND 35 17
XOR 6 19
1111111111111111111
50
NOT 37
OR 23 10
IN 1
AND 28 48
IN 0
IN 0
IN 0
AND 39 21
NOT 6
NOT 40
AND 18 36
IN 0
IN 1
OR 33 43
NOT 27
NOT 25
NOT 35
XOR 16 34
NOT 22
IN 1
AND 4 13
NOT 46
IN 1
NOT 3
OR 5 49
XOR 30 15
OR 41 31
IN 0
IN 0
OR 8 38
IN 1
AND 7 20
NOT 11
IN 1
XOR 2 32
XOR 29 9
AND 50 44
IN 1
IN 0
OR 42 47
IN 0
NOT 14
IN 1
NOT 19
IN 1
IN 0
NOT 26
OR 45 12
IN 1
OR 24 17
0110111111111111111
60
AND 20 4
NOT 42
AND 48 59
OR 17 7
IN 0
AND 36 37
IN 1
IN 0
IN 1
NOT 47
AND 52 49
OR 44 35
IN 0
IN 1
AND 33 56
IN 0
IN 0
IN 0
AND 31 41
OR 15 3
OR 43 46
IN 1
XOR 22 28
IN 1
IN 1
IN 1
AND 34 21
IN 1
IN 1
IN 0
XOR 51 23
XOR 10 54
OR 57 40
IN 0
NOT 18
NOT 25
IN 1
AND 5 50
IN 0
AND 60 53
AND 45 8
IN 0
IN 1
NOT 27
IN 0
IN 1
AND 19 2
OR 29 32
AND 58 24
NOT 16
XOR 55 11
IN 0
NOT 30
AND 12 38
AND 14 9
IN 1
IN 0
OR 26 6
IN 0
AND 13 39
000000000000000000000000011
9
AND 2 3
IN 1
OR 4 5
IN 0
AND 6 7
IN 1
OR 8 9
IN 0
IN 0
01011
print("_RANDOM_GUESS_1690502979.2915313")# 1690502979.2915523