#include <stdio.h>
#define M_n 100000
int main() {
int T;
scanf("%d", &T);
while (T--) {
int N, A[M_n], B[M_n], C[M_n], SUM = 0;
scanf("%d", &N);
for (int i = 0; i < N; i++) scanf("%d", &A[i]);
for (int i = 0; i < N; i++) scanf("%d", &B[i]);
for (int i = 0; i < N; i++) scanf("%d", &C[i]);
for (int i = 0; i < N; i++) {
int currentSum = A[i] + B[i] + C[i];
if (i > 0 && (A[i] == A[i - 1] || B[i] == B[i - 1] || C[i] == C[i - 1])) {
if (i < N - 1) {
currentSum = A[i + 1] + B[i + 1] + C[i + 1];
i++;
}
}
SUM += currentSum;
}
printf("%d\n", SUM);
}
return 0;
}