Whitebeard is testing Luffy to see if he can become the Pirate King. Whitebeard has given Luffy three arrays a,b,c of length n and an integer x. Initially x=1. Luffy initially has score of 0 and can perform the following operation at most n time:
Select 1≤i≤n such that i has not been selected in previous operations and update x by multiplying it with ai that is assign x=x×ai. If the updated x is even then add bi to the score or if updated x is odd then add ci to the score.
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(1≤T≤4×104) — the number of test cases.
Each test case starts with n(1≤n≤2×105) and then three lines follow.
The second line of the test case contains n integers ai(1≤ai≤106).
Third line of the test case contains n integers bi(−109≤bi≤109).
Fourth line of the test case contains n integers ci(−109≤ci≤109).
Sum of n of all test cases does not exceed 2×105.
Output
For each test case, output the maximum score Luffy can obtain if he performs the operations optimally.