The process of the getting into the the Coders Club in JGEC has become quite complex.
All the students of the four years of undergraduate engineering and the professors would propose a list of students who should be selected.
Any student in atleast three of the five total lists gets to be a member of the prestigious Coders Club.
Find the number of members of the Coders Club.
Input
The first line of input contains T the number of test cases.
The following line of the input contains five integers N1, N2, N3, N4 and N5, where Nj is the number of candidates proposed by zone j, 1 ≤ j ≤ 5. This is followed by five lines of space separated integers. For 1 ≤ j ≤ 5, line j+1 of the input has Nj integers representing the list of candidates proposed by zone j.
Output
The output consists of a single integer denoting the number of students selected.
Constraints
1 ≤ T ≤ 50
1 ≤ Nj ≤ 1000
1 ≤ Candidate Number ≤ 104
There are 5 students who are selected.