# Tahsin and Tree CLown1331 Replay of 18th IUT Comput...
Limits 1s, 512 MB

Tahsin loves graph theory very much. He is especially fond of trees. For his upcoming birthday his friends decided to gift him a tree, lets call it birthday tree. Birthday tree consists of $n$ node numbered 1 to $n$, having a light in every node. Initially some of the light is turned on and some are turned off. Root of the tree is 1.

The tree has a special property, when a node is toggled, all the children of the node is also toggled. So if you toggle the node $i$, you also toggle the children of $i$ and so on.

In order to help Tahsin understand the tree better, you are going help him process $q$ queries.

## Input

Input starts with $T$ ($1 \le T \le 5$).

The first line of every test contains two integers $n$ ($1 \le n \le 10^5$) and $q$ ($1 \le q \le 10^5$). The second line contains $n$ integers $a_1$, $a_2$, ..., $a_n$, where $a_i$ is the initial state of the node $i$. Each of the next $n-1$ lines contains two integer $u_i$ and $v_i$ ($1 \le u_i, v_i \le n$), meaning there is an edge between $u_i$ and $v_i$.

Each of the next $q$ line contains an integer $x$ ($1 \le x \le n$), the node to be toggled.

## Output

For each case, after processing all the queries, print $n$ integer $b_1$, $b_2$, ..., $b_n$, denoting the status of the node.

See the sample test case for input output format.

## Sample

InputOutput
1
4 1
0 1 1 0
1 4
2 1
3 1
1

Case 1: 1 0 0 1 DFS uDebug

### Submit
{"ft_lang_label":"__label__en","ft_lang_prob":0.93723077,"math_prob":0.99904156,"size":1141,"snap":"2022-40-2023-06","text_gpt3_token_len":284,"char_repetition_ratio":0.1407212,"word_repetition_ratio":0.00877193,"special_character_ratio":0.26730937,"punctuation_ratio":0.16015625,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99944025,"pos_list":[0,1,2,3,4,5,6,7,8,9,10],"im_url_duplicate_count":[null,null,null,null,null,null,null,null,null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-10-07T22:09:36Z\",\"WARC-Record-ID\":\"<urn:uuid:89bb56fb-188a-42c4-b388-55fad3fd92e2>\",\"Content-Length\":\"53996\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:561b18f2-2561-4ff4-8780-43f329c3cc16>\",\"WARC-Concurrent-To\":\"<urn:uuid:cebcd642-df15-4c73-a674-b4aa9a916be9>\",\"WARC-IP-Address\":\"172.104.160.52\",\"WARC-Target-URI\":\"https://toph.co/p/tahsin-and-tree\",\"WARC-Payload-Digest\":\"sha1:ZFUPFNACMW5JIFANDIDF7A33XOEO4M2Z\",\"WARC-Block-Digest\":\"sha1:CJXRXTT6ZM26I2SH5CW6QTORZAYLHCCG\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-40/CC-MAIN-2022-40_segments_1664030338280.51_warc_CC-MAIN-20221007210452-20221008000452-00109.warc.gz\"}"}