Problem: There are n students at Berland State University. Every student has two skills, each measured as a number: ai — the programming skill and bi — the sports skill.

It is announced that an Olympiad in programming and sports will be held soon. That's why Berland State University should choose two teams: one to take part in the programming track and one to take part in the sports track.

There should be exactly p students in the programming team and exactly s students in the sports team. A student can't be a member of both teams.

The university management considers that the strength of the university on the Olympiad is equal to the sum of two values: the programming team strength and the sports team strength. The strength of a team is the sum of skills of its members in the corresponding area, so the strength of the programming team is the sum of all ai and the strength of the sports team is the sum of all bi over corresponding team members.

Help Berland State University to compose two teams to maximize the total strength of the university on the Olympiad.

Input

The first line contains three positive integer numbers n, p and s (2 ≤ n ≤ 3000, p + s ≤ n) — the number of students, the size of the programming team and the size of the sports team.

The second line contains n positive integers a1, a2, ..., an (1 ≤ ai ≤ 3000), where ai is the programming skill of the i-th student.

The third line contains n positive integers b1, b2, ..., bn (1 ≤ bi ≤ 3000), where bi is the sports skill of the i-th student.

Output

In the first line, print the the maximum strength of the university on the Olympiad. In the second line, print p numbers — the members of the programming team. In the third line, print s numbers — the members of the sports team.

The students are numbered from 1 to n as they are given in the input. All numbers printed in the second and in the third lines should be distinct and can be printed in arbitrary order.

If there are multiple solutions, print any of them.

Examples

Input

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


Output

18
3 4 
1 5 


Input

4 2 2
10 8 8 3
10 7 9 4


Output

31
1 2 
3 4 


Input

5 3 1
5 2 5 1 7
6 3 1 6 3


Output

23
1 3 5 
4 

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
using uint = unsigned;
using lint = long long;
using ulint = unsigned long long;
using ldouble = long double;
using point = complex<double>;
using doublex = complex<ldouble>;
const double E = 1e-9, pi = 2 * acos(0);
const ldouble PI = 2 * acosl(0);
struct SSP {
  int n, source, sink;
  vector<vector<int>> adj;
  struct edge {
    int u, flow, cap, cost, origcost;
  };
  vector<edge> edges;
  SSP(int n, int source, int sink) : n(n), source(source), sink(sink), adj(n) {}
  int add_edge(int a, int b, int cap, int cost) {
    int result = edges.size();
    adj[a].push_back(edges.size());
    edges.push_back({b, 0, cap, cost, cost});
    adj[b].push_back(edges.size());
    edges.push_back({a, 0, 0, -cost, -cost});
    return result;
  }
  pair<int, int> iterate() {
    struct state_t {
      int dist, prev, maxf;
    };
    priority_queue<pair<int, int>, vector<pair<int, int>>,
                   greater<pair<int, int>>>
        pq;
    vector<state_t> states(n, {INT_MAX / 2, -1, 0});
    states[source] = {0, -2, INT_MAX};
    pq.push({states[source].dist, source});
    while (!pq.empty()) {
      int d, v;
      tie(d, v) = pq.top();
      pq.pop();
      if (d != states[v].dist) continue;
      for (int edid : adj[v]) {
        edge &ed = edges[edid];
        if (ed.flow < ed.cap and states[ed.u].dist > states[v].dist + ed.cost) {
          states[ed.u].dist = states[v].dist + ed.cost;
          states[ed.u].prev = edid;
          states[ed.u].maxf = min(states[v].maxf, ed.cap - ed.flow);
          pq.push({states[ed.u].dist, ed.u});
        }
      }
    }
    int lastid = states[sink].prev, extraflow = states[sink].maxf, atcost = 0;
    if (lastid == -1) return {0, 0};
    for (int id = lastid; id != -2; id = states[edges[id ^ 1].u].prev) {
      edges[id].flow += extraflow;
      edges[id ^ 1].flow -= extraflow;
      atcost += edges[id].origcost;
    }
    for (int id = 0; id < (int)edges.size(); id++) {
      int v = edges[id ^ 1].u, u = edges[id].u;
      if (states[v].prev != -1 and states[u].prev != -1)
        edges[id].cost += states[v].dist - states[u].dist;
    }
    return {extraflow, atcost};
  }
  pair<int, int> mfmc() {
    int flow = 0, cost = 0;
    if (any_of(edges.begin(), edges.end(),
               [](const edge &ed) { return ed.flow > 0 and ed.cost < 0; }))
      bellmanford();
    int extraflow, atcost;
    while (tie(extraflow, atcost) = iterate(), extraflow > 0)
      flow += extraflow, cost += extraflow * atcost;
    return {flow, cost};
  }
  void bellmanford() {
    vector<int> dist(n, INT_MAX / 2);
    dist[source] = 0;
    for (int rep = 0; rep < n; rep++) {
      bool changed = false;
      for (int id = 0; id < (int)edges.size(); id++) {
        int v = edges[id ^ 1].u, u = edges[id].u;
        if (edges[id].flow < edges[id].cap and dist[v] != INT_MAX / 2 and
            dist[u] > dist[v] + edges[id].cost) {
          dist[u] = dist[v] + edges[id].cost;
          changed = true;
          assert(rep < n - 1);
        }
      }
      if (!changed) break;
    }
    for (int id = 0; id < (int)edges.size(); id++) {
      int v = edges[id ^ 1].u, u = edges[id].u;
      if (dist[v] < INT_MAX / 2 and dist[u] < INT_MAX / 2)
        edges[id].cost += dist[v] - dist[u];
    }
  }
};
bool solve(int testNumber) {
  int n, p, s;
  if (scanf("%d %d %d", &n, &p, &s) == EOF) return false;
  int N = n + 4, source = N - 1, sink = N - 2, P = n, S = n + 1;
  SSP ssp(N, source, sink);
  ssp.add_edge(source, P, p, 0);
  ssp.add_edge(source, S, s, 0);
  for (int i = 0; i < n; i++) ssp.add_edge(i, sink, 1, 0);
  vector<int> usedP(n), usedS(n);
  for (int i = 0; i < n; i++) {
    int x;
    scanf("%d", &x);
    usedP[i] = ssp.add_edge(P, i, INT_MAX, -x);
  }
  for (int i = 0; i < n; i++) {
    int x;
    scanf("%d", &x);
    usedS[i] = ssp.add_edge(S, i, INT_MAX, -x);
  }
  int res = -ssp.mfmc().second;
  vector<int> A, B;
  for (int i = 0; i < n; i++) {
    if (ssp.edges[usedP[i]].flow) A.push_back(i);
    if (ssp.edges[usedS[i]].flow) B.push_back(i);
  }
  assert((int)A.size() == p);
  assert((int)B.size() == s);
  printf("%d\n", res);
  for (int x : A) printf("%d ", x + 1);
  printf("\n");
  for (int x : B) printf("%d ", x + 1);
  printf("\n");
  return true;
}
void init() {}
int main() {
  init();
  for (int i = 1; solve(i); i++)
    ;
  return 0;
}