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 = 1e5 + 11;
const int MAXN = maxn;
const long long oo = 0x3f3f3f3f3f3f3f3f;
const long long ooo = 0x3f3f3f3f;
long long read() {
  long long x = 0, f = 1;
  register char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int to[maxn << 1], nxt[maxn << 1];
long long cost[maxn << 1], cap[maxn << 1], flow[maxn << 1];
int head[maxn], tot;
void init() {
  memset(head, -1, sizeof head);
  tot = 0;
}
void add(int u, int v, long long c, long long w) {
  to[tot] = v;
  cap[tot] = c;
  flow[tot] = 0;
  cost[tot] = w;
  nxt[tot] = head[u];
  head[u] = tot++;
  swap(u, v);
  to[tot] = v;
  cap[tot] = 0;
  flow[tot] = 0;
  cost[tot] = -w;
  nxt[tot] = head[u];
  head[u] = tot++;
}
struct QUEUE {
  int que[maxn];
  int front, rear;
  void init() { front = rear = 0; }
  void push(int x) { que[rear++] = x; }
  int pop() { return que[front++]; }
  bool empty() { return front == rear; }
} que;
int n, m, s, t;
bool vis[maxn];
long long pre[maxn], dis[maxn];
bool spfa() {
  que.init();
  memset(vis, 0, sizeof vis);
  memset(pre, -1, sizeof pre);
  memset(dis, 0x3f, sizeof dis);
  que.push(s);
  vis[s] = 1;
  dis[s] = 0;
  while (!que.empty()) {
    int u = que.pop();
    vis[u] = 0;
    for (int i = head[u]; ~i; i = nxt[i]) {
      long long v = to[i], c = cap[i], f = flow[i], w = cost[i];
      if (c > f && dis[v] > dis[u] + w) {
        dis[v] = dis[u] + w;
        pre[v] = i;
        if (!vis[v]) {
          que.push(v);
          vis[v] = 1;
        }
      }
    }
  }
  if (dis[t] == oo)
    return 0;
  else
    return 1;
}
pair<long long, long long> mcmf() {
  long long mc = 0, mf = 0;
  while (spfa()) {
    long long tf = oo + 1;
    for (int i = pre[t]; ~i; i = pre[to[i ^ 1]]) {
      tf = min(tf, cap[i] - flow[i]);
    }
    mf += tf;
    for (int i = pre[t]; ~i; i = pre[to[i ^ 1]]) {
      flow[i] += tf;
      flow[i ^ 1] -= tf;
    }
    mc += dis[t] * tf;
  }
  return pair<long long, long long>(mc, mf);
}
int a[MAXN][2], v, p, q;
int main() {
  while (cin >> v >> p >> q) {
    for (int i = 1; i <= v; i++) a[i][0] = read();
    for (int i = 1; i <= v; i++) a[i][1] = read();
    init();
    int ss = 3 * v + 1;
    s = ss + 1;
    int tt1 = s + 1, tt2 = s + 2;
    t = tt2 + 1;
    n = t;
    add(s, ss, p + q, 0);
    add(tt1, t, p, 0);
    add(tt2, t, q, 0);
    for (int i = 1; i <= v; i++) add(ss, i, 1, 0);
    for (int i = 1; i <= v; i++) {
      add(i, v + i, 1, -a[i][0]);
      add(i, 2 * v + i, 1, -a[i][1]);
      add(v + i, tt1, 1, 0);
      add(2 * v + i, tt2, 1, 0);
    }
    pair<long long, long long> pp = mcmf();
    printf("%lld\n", (long long)(-pp.first));
    stack<int> stk[2];
    for (int i = head[tt1]; ~i; i = nxt[i]) {
      int u = to[i], f = flow[i];
      if (u == t || f == 0) continue;
      stk[0].push(u - v);
    }
    for (int i = head[tt2]; ~i; i = nxt[i]) {
      int u = to[i], f = flow[i];
      if (u == t || f == 0) continue;
      stk[1].push(u - 2 * v);
    }
    for (int i = 0; i <= 1; i++)
      while (!stk[i].empty()) {
        if (stk[i].size() == 1)
          printf("%lld\n", (long long)(stk[i].top()));
        else
          printf("%lld ", (long long)(stk[i].top()));
        stk[i].pop();
      }
  }
  return 0;
}