#include <stdio.h>
#define Mn 100000
int main() {
int T;
scanf("%d", &T);
while (T--) {
int N, A[Mn], B[Mn], C[Mn], 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;
}