Little Santa has a list S of names of N nice children and another list P of names of M naughty children. He doesn't want the names of nice children to get mixed with the naughty ones. Little Santa himself is naughty. He is making some changes in the names of naughty children. He can perform three type of queries:
Input format:
First line contains an integer, N, denoting the number of nice children. Next N lines contains the names of the N nice children. Next line contains an integer, M, denoting the number of naughty children. Next M lines contains the names of the M naughty children. Next line contains an integer, Q , denoting the number of queries. Next Q lines contains one of the three types of queries.
Sum of lengths of all the . Sum of lengths of all the .
All the indexing will be 1-based.
All and are not empty.
Output format:
For each third type query, print an integer, denoting the answer of the third query.