The first line contains a integer T,indicates the number of testcase.
In each testcase:
The first line contains there integer n m and q,indicates the number of boys ,the number of girls and the number of question.
The next n line contains one 0/1-strings,if the i-th string's j-th character is 1 means the i-th boy is willing to come with the j-th girl and vice versa.
The next line contains n integers, they are ai.
The next line contains m integers, they are bi.
The next line contains q integers,they are gi.