Luffy Will Become the Pirate King

Limits 1s, 512 MB

Whitebeard is testing Luffy to see if he can become the Pirate King. Whitebeard has given Luffy three arrays a,b,ca, b, c of length nn and an integer xx. Initially x=1x = 1. Luffy initially has score of 00 and can perform the following operation at most nn time:

Luffy wants to maximize his score. So, he is asking for your help. Help Luffy become the pirate king.

Input

The input consists of multiple test cases. The first line contains a single integer T(1T4×104)T(1 \leq T \leq 4 \times 10{^4}) — the number of test cases.

Each test case starts with n(1n2×105)n (1\leq n \leq 2 \times 10^{5}) and then three lines follow.

The second line of the test case contains nn integers ai(1ai106)a_i (1 \leq a_i \leq 10^6).

Third line of the test case contains nn integers bi(109bi109)b_i (-10^9 \leq b_i \leq 10^9).

Fourth line of the test case contains nn integers ci(109ci109)c_i (-10^9 \leq c_i \leq 10^9).

Sum of nn of all test cases does not exceed 2×1052 \times 10^{5}.

Output

For each test case, output the maximum score Luffy can obtain if he performs the operations optimally.

Sample

InputOutput
2
3
1 3 5
4 3 1
10 5 8
2
1 2
1 2
2 1
23
4