B. Producer
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

Through the hands of producers pass many talented musicians, each absorbed in their craft, but lately there have been too many musicians. To solve this problem, one of the producers decided to group the musicians into ensembles of three people (a guitarist, a drummer, and a bassist). Each musician is characterized by their skill level $$$X$$$. The profit that a group brings to the producer is determined by the maximum skill level among all its members. Help the producer form groups of musicians to maximize profit.

Input

In the first line, there is an integer $$$N$$$ ($$$1 \leq N \leq 10^5$$$) — the number of groups that need to be formed. In the following three lines for guitarists, bassists, and drummers respectively, there are $$$N$$$ integers $$$X_{ij}$$$ — their skill levels ($$$1 \leq X_{ij} \leq 1000$$$).

Output

Output one integer — the maximum possible profit.

Examples
Input
4
1 2 3 4
1 2 5 6
1 2 9 3
Output
24
Input
5
1 2 3 4 5
1 2 5 6 4
1 2 9 3 10
Output
35
Note

In the first example, the musicians can be grouped as follows: (1, 2, 9), (2, 6, 1), (3, 5, 2), (4, 1, 3).