Arkady and Masha want to choose decorations for thier aquarium in Fishdom game. They have n decorations to choose from, each of them has some cost. To complete a task Arkady and Masha need to choose exactly m decorations from given, and they want to spend as little money as possible.
There is one difficulty: Masha likes some a of the given decorations, Arkady likes some b of the given decorations. Some decorations may be liked by both Arkady and Masha, or not be liked by both. The friends want to choose such decorations so that each of them likes at least k decorations among the chosen. Help Masha and Arkady find the minimum sum of money they need to spend.
Output
Print single integer: the minimum sum of money the friends should spend to fulfill all constraints. If it is not possible, print
-1.
Note
In the first example the only possible variant to choose
3 decorations having all conditions satisfied is to choose decorations
1,
2,
3.
In the second example friends can choose decoration
4 instead of decoration
3, because this one is one coin cheaper.
In the third example it's not possible to choose
2 decorations in a way that both are liked by both Masha and Arkady.