Minas is working on his new language. He want to add a feature call expandable listview. Here he explains how it works.
It should have some parent node and there should have some child node under parent node.
First only parent row are visible. If any parent row is clicked child row should be visible if its child are not visible otherwise child’s should be hidden. Each click in parent row toggled the visibility of child row. No effect on child row click. Main problem in his implementation is row id’s change when a parent row is clicked.
You can see that after clicking on parent_1, id of parent_2 and parent_3 is changed.
Now Minas will give you the number of parent node and their corresponding number of child node. There will be some query each query Minas will give you ID of the clicked node. You need to tell it is parent node or child node and do the clicked operation.
Input
Input starts with an integer T (T≤30) denoting the number of test cases. Each case starts with a line containing an integer n (n≤100000) denoting number of parent node. Each of the next lines containing n integers ai (1≤ai≤10000, 1≤i≤n) denoting number of child node for i-th parent. Next Line contain an integer q (1≤q≤10000) denoting number of queries. Next q line contain one integer x (1≤x≤number of visible row) denoting ID of clicked node.
Output
For each case, print the case number and for each query print “Parent” if clicked node is parent otherwise print “Child”.