The first line of input contains the number of test cases T. The descriptions of the test cases
follow:
The first line of each test case contains a single integer: the number of junctions n (2《 n≤1000).
Each of the next n - I lines contains two integers a, b (1《 a≠ b≤ n), denoting thatjunctions a a
nd b are connected by a street. Each junction has at most 10 streets leaving it.The next line contai
ns a single integer: the number of planned parades m, 0≤ m <(彩.Each of the next m lines contains t
wo integers ui, vi (1≤ ui≠ vi≤n), meaning that a parade isplanned to start at junction ui, and fi
nish at junction vi. No two parades share both endpoints.