#include <bits/stdc++.h>
using namespace std;

// Template {{{
#define MOD					1000000007
#define MAX					1e9
#define MIN                 -1e9
#define PI					acos(-1.0)
#define mid(s,e)			(s+(e-s)/2)
#define clz(n)				__builtin_clzll(n)
#define all(x)              (x).begin(), (x).end()
#define pb                  push_back

using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vb = vector<bool>;
using vd = vector<double>;
using vs = vector<string>;
 
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using pdd = pair<double, double>;
 
using vpii = vector<pii>;
using vpll = vector<pll>;
using vpdd = vector<pdd>;

void __print(int x) {cerr << x;}
void __print(long x) {cerr << x;}
void __print(long long x) {cerr << x;}
void __print(unsigned x) {cerr << x;}
void __print(unsigned long x) {cerr << x;}
void __print(unsigned long long x) {cerr << x;}
void __print(float x) {cerr << x;}
void __print(double x) {cerr << x;}
void __print(long double x) {cerr << x;}
void __print(char x) {cerr << '\'' << x << '\'';}
void __print(const char *x) {cerr << '\"' << x << '\"';}
void __print(const string &x) {cerr << '\"' << x << '\"';}
void __print(bool x) {cerr << (x ? "true" : "false");}

template<typename T, typename V>
void __print(const pair<T, V> &x) {cerr << '{'; __print(x.first); cerr << ','; __print(x.second); cerr << '}';}
template<typename T>
void __print(const T &x) {int f = 0; cerr << '{'; for (auto &i: x) cerr << (f++ ? "," : ""), __print(i); cerr << "}";}
void _print() {cerr << "]\n";}
template <typename T, typename... V>
void _print(T t, V... v) {__print(t); if (sizeof...(v)) cerr << ", "; _print(v...);}
template<typename T>
void printVec(const T &v, char sep=' ') {for (auto &i: v) cout << i << sep;}
template<typename T>
void printVecPair(const T &v, char sep=' ') {for (auto &i: v) cout << i.first <<" " << i.second<< sep;}


#ifndef ONLINE_JUDGE
#define debug(x...) cerr << "[" << #x << "] = ["; _print(x)
#else
#define debug(x...)
#endif
// }}}

void solve() {
    int n;
    cin>>n;
    vll c(n), a(n), b(n);
    for(ll& i: c) cin>>i;
    for(ll& i: a) cin>>i;
    for(ll& i: b) cin>>i;
    ll ans = 0; ll tot = c[n-1]-1;
    for(int i=n-2;i>=0;i--) {
        if(a[i+1] > b[i+1]) swap(a[i+1],b[i+1]);
        if(a[i+1] == b[i+1]) {
            ans = max(tot+2,ans);
            tot = c[i] - 1;
            continue;
        }
        if(a[i+1] == -1 || b[i+1] == -1) {
            ans = max(tot+2,ans);
            tot = 0;
            continue;
        }
        tot += 2;
        ll c1 = c[i] - (a[i+1] - 1) - (c[i] - b[i+1]) - 1; 
        ll c2 = (a[i+1] - 1) + (c[i] - b[i+1]);
        ans = max(tot+c1,ans);
        
        tot+=c2;
        if(c[i] > tot) tot = c[i] - 1;


    }

    
    cout<<ans<<endl;

    

}

int main() {
    int t;
    cin>>t;
    while(t--) solve();
    return 0;
}




