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;
const long long inf = (int)1e17;
const long long MX = 3001;
int A[3011], B[3011];
int ep[3011], es[3011];
struct edge {
  int from, to;
  long long cap, cost;
  edge() {}
  edge(int from, int to, long long cap, long long cost)
      : from(from), to(to), cap(cap), cost(cost) {}
};
int nodes, S, T;
vector<long long> dist, par, par_idx;
vector<edge> ed;
vector<vector<long long> > g;
void add_edge(int v, int u, int cap, int cost) {
  g[v].push_back((int)(ed).size());
  ed.emplace_back(v, u, cap, cost);
  g[u].push_back((int)(ed).size());
  ed.emplace_back(u, v, 0, -cost);
}
void spfa() {
  dist.resize(nodes);
  par.assign(nodes, -1);
  par_idx.assign(nodes, -1);
  for (int i = 0; i < nodes; i++) dist[i] = inf;
  dist[S] = 0;
  queue<int> q;
  vector<bool> inq(nodes, false);
  q.push(S);
  inq[S] = true;
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    inq[u] = false;
    for (int id : g[u]) {
      auto e = ed[id];
      int v = e.to;
      if (e.cap <= 0) continue;
      if (dist[v] <= dist[u] + e.cost) continue;
      dist[v] = dist[u] + e.cost;
      par[v] = u;
      par_idx[v] = id;
      if (!inq[v]) {
        inq[v] = true;
        q.push(v);
      }
    }
  }
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, pCnt, sCnt;
  cin >> n >> pCnt >> sCnt;
  for (int i = 0; i < n; i++) cin >> A[i];
  for (int i = 0; i < n; i++) cin >> B[i];
  S = n + 2;
  T = n + 3;
  nodes = T + 1;
  g.resize(nodes);
  for (int i = 0; i < nodes; i++) g[i].clear();
  for (int i = 0; i < n; i++) {
    add_edge(S, i, 1, 0);
    add_edge(i, n, 1, -A[i]);
    add_edge(i, n + 1, 1, -B[i]);
  }
  add_edge(n, T, pCnt, 0);
  add_edge(n + 1, T, sCnt, 0);
  long long ans = 0;
  long long flow = 0;
  vector<long long> Pvec, Svec;
  while (flow < n) {
    spfa();
    if (dist[T] == inf) break;
    long long f = n - flow;
    for (int v = T, u = par[v]; v != S; v = u, u = par[v])
      f = min(f, ed[par_idx[v]].cap);
    for (int v = T, u = par[v]; v != S; v = u, u = par[v])
      ans += ed[par_idx[v]].cost, ed[par_idx[v]].cap -= f,
          ed[par_idx[v] ^ 1].cap += f;
    flow += f;
  }
  for (int i = 0; i < (int)(ed).size(); i += 2) {
    int v = ed[i].from;
    int u = ed[i].to;
    int cap = ed[i].cap;
    if (v >= n) continue;
    if (u == n and cap == 0)
      Pvec.push_back(v + 1);
    else if (u == n + 1 and cap == 0)
      Svec.push_back(v + 1);
  }
  cout << -ans << endl;
  for (int x : Pvec) cout << x << " ";
  cout << endl;
  for (int x : Svec) cout << x << " ";
  cout << endl;
  return 0;
}