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 int MAXN = 1e4;
const int MAXE = 1e5;
const int INF = 1e9;
inline int nextInt() {
  int res = 0;
  char c = getchar();
  while (c < '0' || c > '9') c = getchar();
  while (c >= '0' && c <= '9') res = res * 10 + c - '0', c = getchar();
  return res;
}
struct edge {
  int v, to, cn, cs, f, p;
  edge(){};
  edge(int v, int to, int cn, int cs, int f, int p)
      : v(v), to(to), cn(cn), cs(cs), f(f), p(p){};
};
vector<int> g[MAXN];
edge ee[MAXE];
int tope;
int phi[MAXN], d[MAXN];
int a[MAXN], b[MAXN], p[MAXN];
void add_edge(int v, int to, int cn, int cs) {
  ee[tope] = edge(v, to, cn, cs, 0, tope + 1);
  g[v].push_back(tope++);
  ee[tope] = edge(to, v, 0, -cs, 0, tope - 1);
  g[to].push_back(tope++);
}
void max_flow(int n, int sr, int sk) {
  int v, to;
  bool was = 0;
  for (int i = 0; i < n; i++) {
    d[i] = INF;
  }
  d[sr] = 0;
  for (int i = 0; i < n; i++) {
    was = 0;
    for (int j = 0; j < tope; j++) {
      v = ee[j].v;
      to = ee[j].to;
      if (ee[j].cn > ee[j].f && d[to] > d[v] + ee[j].cs) {
        d[to] = d[v] + ee[j].cs;
        was = 1;
      }
    }
    if (!was) break;
  }
  for (int i = 0; i < n; i++) {
    phi[i] = d[i];
  }
  p[sr] = -1;
  for (;;) {
    for (int i = 0; i < n; i++) {
      d[i] = INF;
    }
    priority_queue<pair<int, int> > st;
    d[sr] = 0;
    st.push(make_pair(-d[sr], sr));
    while (!st.empty()) {
      v = st.top().second;
      int cur = -st.top().first;
      st.pop();
      if (cur > d[v]) continue;
      for (int i = 0; i < (int)g[v].size(); i++) {
        int edge_num = g[v][i];
        int to = ee[edge_num].v == v ? ee[edge_num].to : ee[edge_num].v;
        int cost = ee[edge_num].cs + phi[v] - phi[to];
        if (ee[edge_num].cn > ee[edge_num].f && d[to] > d[v] + cost) {
          d[to] = d[v] + cost;
          p[to] = edge_num;
          st.push(make_pair(-d[to], to));
        }
      }
    }
    if (d[sk] == INF) break;
    int v = sk;
    int flow = INF;
    while (p[v] != -1) {
      int num = p[v];
      flow = min(flow, ee[num].cn - ee[num].f);
      v = ee[num].v;
    }
    v = sk;
    while (p[v] != -1) {
      int num = p[v];
      ee[num].f += flow;
      ee[ee[num].p].f -= flow;
      v = ee[num].v;
    }
  }
}
void solve() {
  int p, s, n;
  n = nextInt();
  p = nextInt();
  s = nextInt();
  int sr = 0, sk = n + 3;
  add_edge(n + 1, sk, p, 0);
  add_edge(n + 2, sk, s, 0);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    add_edge(sr, i, 1, 0);
    add_edge(i, n + 1, 1, -a[i]);
  }
  for (int i = 1; i <= n; i++) {
    scanf("%d", &b[i]);
    add_edge(i, n + 2, 1, -b[i]);
  }
  int n2 = sk + 1;
  max_flow(n2, sr, sk);
  long long total = 0;
  vector<int> pro, spo;
  for (int i = 0; i < tope; i++) {
    if (ee[i].cs < 0) {
      if (ee[i].f == 1) {
        if (ee[i].to == n + 1) {
          pro.push_back(ee[i].v);
        } else if (ee[i].to == n + 2) {
          spo.push_back(ee[i].v);
        }
      }
      total += ee[i].f * ee[i].cs;
    }
  }
  cout << -total << endl;
  for (int i = 0; i < (int)pro.size(); i++) printf("%d ", pro[i]);
  printf("\n");
  for (int i = 0; i < (int)spo.size(); i++) printf("%d ", spo[i]);
  printf("\n");
}
int main() {
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}