Bobo has an undirected graph with (2n+2) vertices conveniently labeled with the following pairs of integers: (0,0),(0,1),…,(0,n),(1,0),(1,1),…,(1,n). The graph has three classes of edges.
Bobo would like to find the maximum flow from vertex (0,0) to vertex (1,n).
The input contains zero or more test cases, and is terminated by end-of-file. For each test case:
The first line contains an integer n (1≤n≤5⋅105).
The second line contains n integers a_1,a_2,…,a_n.
The third line contains n integers b_1,b_2,…,b_n.
The fourth line contains (2n+1) integers c_1,c_2,…,c_2n+1.
The constraints are: 1≤a_i,b_i,c_i≤109.
It is guaranteed that the number of test cases does not exceed 105, and the sum of all n does not exceed 5⋅105.
For each test case, output an integer which denotes the maximum flow.