{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv\u003e \n \u003cp\u003e There is an apple tree outside of \u003cspan\u003ekaka\u0027s\u003c/span\u003e house. Every autumn, a lot of apples will grow in the tree. \u003cspan\u003eKaka\u003c/span\u003e likes apple very much, so he has been carefully nurturing the big apple tree.\u003c/p\u003e \n \u003cp\u003e The tree has \u003ci\u003eN\u003c/i\u003e forks which are connected by branches. \u003cspan\u003eKaka\u003c/span\u003e numbers the forks by 1 to \u003ci\u003eN\u003c/i\u003e and the root is always numbered by 1. Apples will grow on the forks and two apple won\u0027t grow on the same fork. \u003cspan\u003ekaka\u003c/span\u003e wants to know how many apples are there in a sub-tree, for his study of the produce ability of the apple tree.\u003c/p\u003e \n \u003cp\u003e The trouble is that a new apple may grow on an empty fork some time and \u003cspan\u003ekaka\u003c/span\u003e may pick an apple from the tree for his dessert. Can you help \u003cspan\u003ekaka\u003c/span\u003e?\u003c/p\u003e \n \u003cp\u003e \u0026nbsp;\u003c/p\u003e \n \u003cimg src\u003d\"http://7xjob4.com1.z0.glb.clouddn.com/95a992a75f75b7d92488d79284d3b4ef\"\u003e \n \u003cp\u003e \u0026nbsp;\u003c/p\u003e \n\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cdiv\u003e \n \u003cp\u003e The first line contains an integer \u003ci\u003eN\u003c/i\u003e (\u003ci\u003eN\u003c/i\u003e ≤ 100,000) , which is the number of the forks in the tree.\u003cbr\u003e The following \u003ci\u003eN\u003c/i\u003e - 1 lines each contain two integers \u003ci\u003eu\u003c/i\u003e and \u003ci\u003ev\u003c/i\u003e, which means fork \u003ci\u003eu\u003c/i\u003e and fork \u003ci\u003ev\u003c/i\u003e are connected by a branch.\u003cbr\u003e The next line contains an integer \u003ci\u003eM\u003c/i\u003e (\u003ci\u003eM\u003c/i\u003e ≤ 100,000).\u003cbr\u003e The following \u003ci\u003eM\u003c/i\u003e lines each contain a message which is either\u003cbr\u003e \"\u003cb\u003eC \u003ci\u003ex\u003c/i\u003e\u003c/b\u003e\" which means the existence of the apple on fork \u003ci\u003ex\u003c/i\u003e has been changed. i.e. if there is an apple on the fork, then \u003cspan\u003eKaka\u003c/span\u003e pick it; otherwise a new apple has grown on the empty fork.\u003cbr\u003e or\u003cbr\u003e \"\u003cb\u003eQ \u003ci\u003ex\u003c/i\u003e\u003c/b\u003e\" which means an inquiry for the number of apples in the sub-tree above the fork \u003ci\u003ex\u003c/i\u003e, including the apple (if exists) on the fork x\u003cbr\u003e Note the tree is full of apples at the beginning\u003c/p\u003e \n\u003c/div\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cdiv\u003e\n For every inquiry, output the correspond answer per line.\n\u003c/div\u003e"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre\u003e\r\n3\r\n1 2\r\n1 3\r\n3\r\nQ 1\r\nC 2\r\nQ 1\r\n\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre\u003e\r\n3\r\n2\r\n\u003c/pre\u003e"}}]}