Erin loves farming PP (performance points) in osu!, and he wants to maximize his gains. He has an assortment of beatmaps which he has played before, numbered from to , where each beatmap has an assigned PP value. He also has other beatmaps that he hasn't played yet, which are likewise numbered from to and each one of the beatmaps has an assigned PP value.

Task
In order to quench his addiction, he decides to take a look at scenarios of the type: "What if my top plays are only made up of the already played maps from , and I can take any number, , of unplayed maps from , and overwrite any of my top plays; what is the maximum possible PP sum that I can obtain, if I choose and the beatmaps optimally?"
For each of these scenarios, you have to find the maximum PP sum that can be obtained, choosing optimally.
Input data
The first line contains the space-separated integers , and .
The second line contains space-separated integers, .
The third line contains space-separated integers, .
Each of the next lines contain four space-separated integers, .
Output data
The output file must contain lines corresponding to the test cases, each consisting of 64-bit integer .
Constraints and clarifications
- .
- .
- .
- for each .
- for each .
- , for each .
- , for each .
| # | Score | Constraints |
|---|---|---|
| 1 | 0 | Examples |
| 2 | 10 | |
| 3 | 12 | |
| 4 | 8 | , |
| 5 | 9 | , |
| 6 | 10 | , |
| 7 | 20 | |
| 8 | 31 | No additional restrictions |
Example
stdin
5 4 5
50 40 26 100 72
500 999 1 2
0 4 0 3
1 3 0 2
3 4 2 3
3 4 1 2
1 4 0 1
stdout
1721
1599
172
1099
1671
Explanation
In the first scenario, your played maps are , and your unplayed maps are . Choosing to play the beatmaps with values and , and overwriting the already played ones with values and , you obtain the optimal sum of .
In the second scenario, your played maps are , and your unplayed maps are . Choosing to play the beatmaps with values and , and overwriting the already played ones with values and , you obtain the optimal sum of .
In the third scenario, your played maps are , and your unplayed maps are . Choosing to keep all of your current top plays, you obtain the optimal sum of .
In the fourth scenario, your played maps are , and your unplayed maps are . Choosing to play the beatmap with value and overwriting the already played one with value , you obtain the optimal sum of .
In the fifth scenario, your played maps are , and your unplayed maps are . Choosing to play the beatmaps with values and and overwriting the already played ones with values and , you obtain the optimal sum of .