#include <bits/stdc++.h>
template <class T>
bool tomin(T &a, const T &b) {
  return (b < a) ? (a = b, true) : false;
}
template <class T>
bool tomax(T &a, const T &b) {
  return (a < b) ? (a = b, true) : false;
}
const double EPS = 1e-9;
const double PI = 3.141592653589793238462;
const long long INF = 1070000000LL;
const long long MOD = 1000000007LL;
using namespace std;
int n, m, k;
long long c[200010];
int t[200010];
int main() {
  cin.tie(NULL);
  ios_base::sync_with_stdio(false);
  cin >> n >> m >> k;
  for (long long i = (long long)(0); i < (long long)(n); i++) cin >> c[i];
  int na, nb;
  cin >> na;
  for (long long i = (long long)(0); i < (long long)(na); i++) {
    int x;
    cin >> x;
    x--;
    t[x] |= 1;
  }
  cin >> nb;
  for (long long i = (long long)(0); i < (long long)(nb); i++) {
    int x;
    cin >> x;
    x--;
    t[x] |= 2;
  }
  vector<long long> v[4];
  for (long long i = (long long)(0); i < (long long)(n); i++) {
    v[t[i]].emplace_back(c[i]);
  }
  for (long long i = (long long)(1); i < (long long)(4); i++) {
    sort((v[i]).begin(), (v[i]).end());
    while (((long long)(v[i]).size()) > k) {
      v[0].emplace_back(v[i].back());
      v[i].pop_back();
    }
  }
  int min_a =
      max(0LL, max(((long long)(v[3]).size()) - (n - m),
                   max(2LL * k - m, k - min(((long long)(v[1]).size()),
                                            ((long long)(v[2]).size())))));
  if (min_a > ((long long)(v[3]).size()) || m < k) {
    cout << -1 << endl;
    return 0;
  }
  int num[4] = {m - min_a - 2 * (k - min_a), k - min_a, k - min_a, min_a};
  for (long long i = (long long)(1); i < (long long)(3); i++) {
    for (long long j = (long long)(num[i]);
         j < (long long)(((long long)(v[i]).size())); j++) {
      v[0].emplace_back(v[i][j]);
    }
  }
  sort((v[0]).begin(), (v[0]).end());
  long long sum = 0;
  priority_queue<long long> Q;
  for (long long i = (long long)(0); i < (long long)(num[0]); i++) {
    sum += v[0][i];
    Q.push(v[0][i]);
  }
  int pos = num[0];
  for (long long i = (long long)(1); i < (long long)(4); i++) {
    for (long long j = (long long)(0); j < (long long)(num[i]); j++) {
      sum += v[i][j];
    }
  }
  long long ans = sum;
  for (long long i = (long long)(min_a + 1);
       i < (long long)(((long long)(v[3]).size()) + 1); i++) {
    sum += v[3][num[3]++];
    Q.push(v[1][--num[1]]);
    Q.push(v[2][--num[2]]);
    int rm = 1;
    if (pos < ((long long)(v[0]).size())) {
      sum += v[0][pos];
      Q.push(v[0][pos]);
      rm++;
      pos++;
    }
    for (long long _ = (long long)(0); _ < (long long)(rm); _++) {
      long long t = Q.top();
      Q.pop();
      sum -= t;
    }
    tomin(ans, sum);
  }
  cout << ans << endl;
}

### Prompt

Generate a cpp solution to the following problem:

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.

Input

The first line contains three integers n, m and k (1 ≤ n ≤ 200000, 1 ≤ m ≤ n, 1 ≤ k ≤ n) — the number of decorations, how many decorations the friends should choose, how many decorations each of them should like among the chosen.

The second line contains n integers c1, c2, ..., cn (1 ≤ ci ≤ 109) — decorations costs.

The third line contains single integer a (1 ≤ a ≤ n) — the number of decorations liked by Masha. The fourth line contains a distinct integers x1, x2, ..., xa (1 ≤ xi ≤ n) — the ids of decorations liked by Masha.

The next two lines describe decorations liked by Arkady in the same format.

Output

Print single integer: the minimum sum of money the friends should spend to fulfill all constraints. If it is not possible, print -1.

Examples

Input

4 3 2
3 2 2 1
2
1 2
2
1 3


Output

7


Input

4 3 2
3 2 2 1
2
1 2
3
4 1 3


Output

6


Input

4 2 2
3 2 2 1
2
1 2
3
4 1 3


Output

-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.

### Response

```cpp
#include <bits/stdc++.h>
template <class T>
bool tomin(T &a, const T &b) {
  return (b < a) ? (a = b, true) : false;
}
template <class T>
bool tomax(T &a, const T &b) {
  return (a < b) ? (a = b, true) : false;
}
const double EPS = 1e-9;
const double PI = 3.141592653589793238462;
const long long INF = 1070000000LL;
const long long MOD = 1000000007LL;
using namespace std;
int n, m, k;
long long c[200010];
int t[200010];
int main() {
  cin.tie(NULL);
  ios_base::sync_with_stdio(false);
  cin >> n >> m >> k;
  for (long long i = (long long)(0); i < (long long)(n); i++) cin >> c[i];
  int na, nb;
  cin >> na;
  for (long long i = (long long)(0); i < (long long)(na); i++) {
    int x;
    cin >> x;
    x--;
    t[x] |= 1;
  }
  cin >> nb;
  for (long long i = (long long)(0); i < (long long)(nb); i++) {
    int x;
    cin >> x;
    x--;
    t[x] |= 2;
  }
  vector<long long> v[4];
  for (long long i = (long long)(0); i < (long long)(n); i++) {
    v[t[i]].emplace_back(c[i]);
  }
  for (long long i = (long long)(1); i < (long long)(4); i++) {
    sort((v[i]).begin(), (v[i]).end());
    while (((long long)(v[i]).size()) > k) {
      v[0].emplace_back(v[i].back());
      v[i].pop_back();
    }
  }
  int min_a =
      max(0LL, max(((long long)(v[3]).size()) - (n - m),
                   max(2LL * k - m, k - min(((long long)(v[1]).size()),
                                            ((long long)(v[2]).size())))));
  if (min_a > ((long long)(v[3]).size()) || m < k) {
    cout << -1 << endl;
    return 0;
  }
  int num[4] = {m - min_a - 2 * (k - min_a), k - min_a, k - min_a, min_a};
  for (long long i = (long long)(1); i < (long long)(3); i++) {
    for (long long j = (long long)(num[i]);
         j < (long long)(((long long)(v[i]).size())); j++) {
      v[0].emplace_back(v[i][j]);
    }
  }
  sort((v[0]).begin(), (v[0]).end());
  long long sum = 0;
  priority_queue<long long> Q;
  for (long long i = (long long)(0); i < (long long)(num[0]); i++) {
    sum += v[0][i];
    Q.push(v[0][i]);
  }
  int pos = num[0];
  for (long long i = (long long)(1); i < (long long)(4); i++) {
    for (long long j = (long long)(0); j < (long long)(num[i]); j++) {
      sum += v[i][j];
    }
  }
  long long ans = sum;
  for (long long i = (long long)(min_a + 1);
       i < (long long)(((long long)(v[3]).size()) + 1); i++) {
    sum += v[3][num[3]++];
    Q.push(v[1][--num[1]]);
    Q.push(v[2][--num[2]]);
    int rm = 1;
    if (pos < ((long long)(v[0]).size())) {
      sum += v[0][pos];
      Q.push(v[0][pos]);
      rm++;
      pos++;
    }
    for (long long _ = (long long)(0); _ < (long long)(rm); _++) {
      long long t = Q.top();
      Q.pop();
      sum -= t;
    }
    tomin(ans, sum);
  }
  cout << ans << endl;
}

```