1476_C. Longest Simple Cycle
You have n chains, the i-th chain consists of c_i vertices. Vertices in each chain are numbered independently from 1 to c_i along the chain. In other words, the i-th chain is the undirected graph with c_i vertices and (c_i - 1) edges connecting the j-th and the (j + 1)-th vertices for each 1 ≤ j < c_i.

Now you decided to unite chains in one graph in the following way: 

  1. the first chain is skipped; 
  2. the 1-st vertex of the i-th chain is connected by an edge with the a_i-th vertex of the (i - 1)-th chain; 
  3. the last (c_i-th) vertex of the i-th chain is connected by an edge with the b_i-th vertex of the (i - 1)-th chain. 

<image> Picture of the first test case. Dotted lines are the edges added during uniting process

Calculate the length of the longest simple cycle in the resulting graph.

A simple cycle is a chain where the first and last vertices are connected as well. If you travel along the simple cycle, each vertex of this cycle will be visited exactly once.

Input

The first line contains a single integer t (1 ≤ t ≤ 1000) — the number of test cases.

The first line of each test case contains the single integer n (2 ≤ n ≤ 10^5) — the number of chains you have.

The second line of each test case contains n integers c_1, c_2, ..., c_n (2 ≤ c_i ≤ 10^9) — the number of vertices in the corresponding chains.

The third line of each test case contains n integers a_1, a_2, ..., a_n (a_1 = -1; 1 ≤ a_i ≤ c_{i - 1}).

The fourth line of each test case contains n integers b_1, b_2, ..., b_n (b_1 = -1; 1 ≤ b_i ≤ c_{i - 1}).

Both a_1 and b_1 are equal to -1, they aren't used in graph building and given just for index consistency. It's guaranteed that the sum of n over all test cases doesn't exceed 10^5.

Output

For each test case, print the length of the longest simple cycle.

Example

Input


3
4
3 4 3 3
-1 1 2 2
-1 2 2 3
2
5 6
-1 5
-1 1
3
3 5 2
-1 1 1
-1 3 5


Output


7
11
8

Note

In the first test case, the longest simple cycle is shown below: 

<image>

We can't increase it with the first chain, since in such case it won't be simple — the vertex 2 on the second chain will break simplicity.
```python
import math,sys,bisect,heapq,os
from collections import defaultdict,Counter,deque
from itertools import groupby,accumulate
from functools import lru_cache
#sys.setrecursionlimit(200000000)
int1 = lambda x: int(x) - 1
def input(): return sys.stdin.readline().rstrip('\r\n')
#input = iter(sys.stdin.buffer.read().decode().splitlines()).__next__
aj = lambda: list(map(int, input().split()))
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
#MOD = 1000000000 + 7
def Y(c):  print(["NO","YES"][c])
def y(c):  print(["no","yes"][c])
def Yy(c):  print(["No","Yes"][c])



def solve():
	for _ in range(int(input())):
		n, = aj()
		c = aj()
		a = aj()
		b = aj()
		ans = 0
		tot = c[-1]
		for i in range(n-1,0,-1):
			tot += 2
			if a[i] > b[i]:
				a[i],b[i] = b[i],a[i]
			ans = max(ans,tot + b[i] - a[i] - 1)
			if a[i] == b[i]:
				tot = c[i-1]
			else:
				tot += a[i]-1
				tot += c[i-1]-b[i]
			tot = max(tot,c[i-1])
		print(ans)







try:
	#os.system("online_judge.py")
	sys.stdin = open('input.txt', 'r') 
	sys.stdout = open('output.txt', 'w')
except:
	pass

solve()
```