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;
template <typename T>
T In() {
  char ch;
  T n = 0;
  bool ng = false;
  while (1) {
    ch = getchar();
    if (ch == '-') {
      ng = true;
      ch = getchar();
      break;
    }
    if (ch >= '0' && ch <= '9') break;
  }
  while (1) {
    n = n * 10 + (ch - '0');
    ch = getchar();
    if (ch < '0' || ch > '9') break;
  }
  return (ng ? -n : n);
}
template <class T, class first>
inline bool checkbit(T a, first pos) {
  T t = 1;
  return ((a & (t << pos)) > 0);
}
template <class T, class first>
inline T setbit(T a, first pos) {
  T t = 1;
  return (a | (t << pos));
}
template <class T, class first>
inline T resetbit(T a, first pos) {
  T t = 1;
  return (a & (~(t << pos)));
}
template <class T, class first>
inline T togglebit(T a, first pos) {
  T t = 1;
  return (a ^ (t << pos));
}
template <typename T>
T POW(T base, T power) {
  T ret = 1;
  while (power) {
    if (power & 1) ret = (ret * base);
    base = (base * base);
    power >>= 1;
  }
  return ret;
}
template <typename T>
T GCD(T a, T b) {
  if (a < 0) return GCD(-a, b);
  if (b < 0) return GCD(a, -b);
  return (b == 0) ? a : GCD(b, a % b);
}
template <typename T>
T LCM(T a, T b) {
  if (a < 0) return LCM(-a, b);
  if (b < 0) return LCM(a, -b);
  return a * (b / GCD(a, b));
}
template <typename T>
T EUCLIDE(T a, T b, T &x, T &y) {
  if (a < 0) {
    T d = euclide(-a, b, x, y);
    x = -x;
    return d;
  }
  if (b < 0) {
    T d = euclide(a, -b, x, y);
    y = -y;
    return d;
  }
  if (b == 0) {
    x = 1;
    y = 0;
    return a;
  } else {
    T d = euclide(b, a % b, x, y);
    T t = x;
    x = y;
    y = t - (a / b) * y;
    return d;
  }
}
template <typename T>
T ABS(T a) {
  if (a < 0)
    return -a;
  else
    return a;
}
long long Bigmod(long long base, long long power, long long _MOD) {
  long long ret = 1;
  while (power) {
    if (power & 1) ret = (ret * base) % _MOD;
    base = (base * base) % _MOD;
    power >>= 1;
  }
  return ret;
}
long long ModInverse(long long number, long long _MOD) {
  return Bigmod(number, _MOD - 2LL, _MOD);
}
template <typename T>
double DIS(T x1, T y1, T x2, T y2) {
  return sqrt((double)((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)));
}
template <typename T>
T ANGLE(T x1, T y1, T x2, T y2) {
  return atan(double(y1 - y2) / double(x1 - x2));
}
template <typename T>
long long isLeft(T a, T b, T c) {
  return (c.x - a.x) * (b.y - a.y) - (b.x - a.x) * (c.y - a.y);
}
const double PI = 2 * acos(0);
double DEG(double x) { return (180.0 * x) / (PI * 1.0); }
double RAD(double x) { return (x * (PI * 1.0)) / (180.0); }
void P_ARR(int *ar, int a, int b) {
  if (a > b) swap(a, b);
  if (a <= b) cout << ar[a];
  for (int i = a + 1; i <= b; i++) cout << " " << ar[i];
  cout << endl;
}
template <class T>
inline void make_unique_vec(vector<T> &vec) {
  sort(vec.begin(), vec.end());
  vec.erase(unique(vec.begin(), vec.end()), vec.end());
}
template <class T>
inline void make_unique_arr(T *ar, int &n) {
  sort(ar + 1, ar + n + 1);
  n = unique(ar + 1, ar + n + 1) - ar - 1;
}
struct MinCostMaxFlow {
  struct node {
    int from, to, next, cap;
    int cst;
  } edge[300007];
  int head[6007];
  int q[6007], front, rear, avail, vn;
  int in[6007], pre[6007];
  int cost[6007];
  bool vis[6007];
  void init(int maxnode) {
    avail = 0;
    vn = maxnode;
    memset(head, -1, sizeof(head));
  }
  void insert(int from, int to, int cap, int cst) {
    edge[avail].from = from;
    edge[avail].to = to;
    edge[avail].cap = cap;
    edge[avail].cst = cst;
    edge[avail].next = head[from];
    head[from] = avail++;
    edge[avail].from = to;
    edge[avail].to = from;
    edge[avail].cap = 0;
    edge[avail].cst = -cst;
    edge[avail].next = head[to];
    head[to] = avail++;
  }
  bool spfa(int src, int des) {
    for (int i = 0; i <= vn; i++) cost[i] = INT_MAX;
    memset(vis, 0, sizeof(vis));
    memset(in, 0, sizeof(in));
    cost[src] = 0;
    pre[src] = -1;
    front = 0, rear = 1;
    q[front] = src;
    vis[src] = true;
    in[src]++;
    while (front != rear) {
      int u = q[front++], v;
      front %= 6007;
      vis[u] = false;
      for (int i = head[u]; i != -1; i = edge[i].next) {
        v = edge[i].to;
        if (edge[i].cap > 0 && cost[v] > cost[u] + edge[i].cst) {
          cost[v] = cost[u] + edge[i].cst;
          pre[v] = i;
          if (!vis[v]) {
            q[rear++] = v;
            rear %= 6007;
            vis[v] = true;
            in[v]++;
            if (in[v] > vn) return false;
          }
        }
      }
    }
    if (cost[des] < INT_MAX)
      return true;
    else
      return false;
  }
  pair<long long, long long> mincostmaxflow(int src, int des) {
    long long mincost = 0, maxflow = 0;
    int i, j;
    while (spfa(src, des)) {
      int flow = INT_MAX;
      for (i = pre[des]; i != -1; i = pre[edge[i].from]) {
        flow = min(flow, edge[i].cap);
      }
      maxflow += flow;
      for (i = pre[des]; i != -1; i = pre[edge[i].from]) {
        edge[i].cap -= flow;
        edge[i ^ 1].cap += flow;
      }
      mincost += ((long long)cost[des] * (long long)flow);
    }
    return make_pair(mincost, maxflow);
  }
  void print(int src, int n) {
    int u = src, v;
    int flag = 0;
    for (int i = head[u]; i != -1; i = edge[i].next) {
      int v = edge[i].to;
      int cst = edge[i].cst;
      int cap = edge[i].cap;
      if (cap == 1 && v >= n + 1 && v <= n + n) {
        if (flag) printf(" ");
        flag = 1;
        printf("%d", v - n);
      }
    }
    puts("");
    ;
  }
} MCMF;
int ar[100007];
int br[100007];
int main() {
  int n;
  scanf("%d", &(n));
  ;
  int p;
  scanf("%d", &(p));
  ;
  int s;
  scanf("%d", &(s));
  ;
  for (int i = 1; i <= n; i++) scanf("%d", &(ar[i]));
  for (int i = 1; i <= n; i++) scanf("%d", &(br[i]));
  int pool_p = n + n + 1;
  int pool_s = n + n + 2;
  int src = n + n + 3;
  int des = n + n + 4;
  MCMF.init(des);
  for (int i = 1; i <= n; i++) {
    int s = i;
    int e = i + n;
    MCMF.insert(s, e, 1, 0);
    MCMF.insert(e, pool_p, 1, -1 * ar[i]);
    MCMF.insert(e, pool_s, 1, -1 * br[i]);
    MCMF.insert(src, s, 1, 0);
  }
  MCMF.insert(pool_p, des, p, 0);
  MCMF.insert(pool_s, des, s, 0);
  pair<long long, long long> res = MCMF.mincostmaxflow(src, des);
  long long ret = res.first * -1;
  printf("%lld\n", ret);
  MCMF.print(pool_p, n);
  MCMF.print(pool_s, n);
  return 0;
}