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 inf = 0x3f3f3f3f;
struct Edge {
  int x, c, w, nxt;
  Edge() {}
  Edge(int x, int c, int w, int nxt) : x(x), c(c), w(w), nxt(nxt) {}
} edge[100010];
int head[3010], dis[3010], pre[3010], pree[3010];
bool inque[3010], vis[3010];
int n, n1, n2, e, src, sink;
void addedge(int x, int y, int c, int w) {
  edge[e] = Edge(y, c, w, head[x]);
  head[x] = e++;
  edge[e] = Edge(x, 0, -w, head[y]);
  head[y] = e++;
}
bool spfa() {
  int x, y, w;
  queue<int> que;
  memset(dis, 0x3f, sizeof(dis));
  memset(inque, 0, sizeof(inque));
  que.push(src);
  dis[src] = 0;
  inque[src] = true;
  while (!que.empty()) {
    x = que.front();
    que.pop();
    inque[x] = false;
    for (int i = head[x]; i != -1; i = edge[i].nxt) {
      y = edge[i].x;
      w = edge[i].w;
      if (edge[i].c > 0 && dis[x] + w < dis[y]) {
        dis[y] = dis[x] + w;
        pre[y] = x;
        pree[y] = i;
        if (!inque[y] && y != sink) {
          que.push(y);
          inque[y] = true;
        }
      }
    }
  }
  return dis[sink] < inf;
}
int mincostflow() {
  int ans = 0, minc, x, d;
  while (spfa()) {
    minc = inf;
    x = sink;
    while (x != src) {
      minc = min(minc, edge[pree[x]].c);
      x = pre[x];
    }
    x = sink;
    while (x != src) {
      edge[pree[x]].c -= minc;
      edge[pree[x] ^ 1].c += minc;
      x = pre[x];
    }
    ans += minc * dis[sink];
  }
  return ans;
}
void doing(int x) {
  memset(vis, 0, sizeof(vis));
  for (int i = head[x]; i != -1; i = edge[i].nxt)
    if ((i & 1) == 0 && edge[i].c) vis[edge[i].x] = true;
}
int main() {
  scanf("%d%d%d", &n, &n1, &n2);
  e = 0;
  memset(head, -1, sizeof(head));
  src = 0;
  sink = n + 1;
  int p1 = n + 2, p2 = n + 3;
  addedge(src, p1, n1, 0);
  addedge(src, p2, n2, 0);
  int z;
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &z);
    addedge(p1, i, 1, -z);
    addedge(i, sink, 1, 0);
  }
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &z);
    addedge(p2, i, 1, -z);
  }
  int ans = -mincostflow();
  printf("%d\n", ans);
  doing(p1);
  for (int i = 1; i <= n; ++i)
    if (!vis[i]) printf("%d ", i);
  printf("\n");
  doing(p2);
  for (int i = 1; i <= n; ++i)
    if (!vis[i]) printf("%d ", i);
  printf("\n");
  return 0;
}