This problem contains multiple test cases.
The first line contains an integer $T$ ($1 \leq T \leq 20$) indicating the number of test cases.
For each test case, the first line of the input contains an integer $n (1 \leq n \leq 10^5)$ indicates the number of the strings.
Each of the next $n$ lines contains a string containing only lowercase letters.
The next line contains an integer $q$, the number of the queries.
Each of the next $q (1 \leq q \leq 10^5)$ lines contains an integer $k (1 \leq k \leq 10^7)$ represeting a query.
It is guaranteed that for each test case, the sum of the length of all strings is no more than $2 \times 10 ^ 5$.