Let’s define the Fibonacci Sequence f1,f2,⋯ as f1=1,f2=2,fi=fi−1+fi−2(i⩾3).
It’s well known that every positive integer x has its unique Fibonacci representation b1,b2,⋯,bn such that: b1×f1+b2×f2+⋯+bn×fn=x; bn=1, and for each 1⩽i<n, $b_i∈\{0,1\}$ always holds; for each 1⩽i<n, bi×bi+1=0 always holds.
For example, 4=(1,0,1), 5=(0,0,0,1), and 20=(0,1,0,1,0,1) because 20=f2+f4+f6=2+5+13.
There are two positive integers A and B written in Fibonacci representation, Skywalkert calculated the product of A and B and written the result C in Fibonacci representation. Assume the Fibonacci representation of C is b1,b2,⋯,bn, Little Q then selected a bit k(1⩽k<n) such that bk=1 and modified bk to 0.
It is so slow for Skywalkert to calculate the correct result again using Fast Fourier Transform and tedious reduction. Please help Skywalkert to find which bit k was modified.
Input
The first line of the input contains a single integer T(1⩽T⩽10000), the number of test cases.
For each case, the first line of the input contains the Fibonacci representation of A, the second line contains the Fibonacci representation of B, and the third line contains the Fibonacci representation of modified C.
Each line starts with an integer n, denoting the length of the Fibonacci representation, followed by n integers b1,b2,⋯,bn, denoting the value of each bit.
It is guaranteed that: 1⩽∣A∣,∣B∣⩽1000000, 2⩽∣C∣⩽∣A∣+∣B∣+1, ∑∣A∣,∑∣B∣⩽5000000.
Output
For each test case, output a single line containing an integer, the value of k.