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;
struct ii {
  int x, y;
  ii(int x = 0, int y = 0) : x(x), y(y) {}
  inline bool operator<(const ii &a) const {
    return (x == a.x && y < a.y) || x < a.x;
  }
  ii operator+(const ii &a) const { return ii(x + a.x, y + a.y); }
  ii operator-(const ii &a) const { return ii(x - a.x, y - a.y); }
  bool operator==(const ii &a) const { return x == a.x && y == a.y; }
};
template <class v>
void sc(v &x) {
  char c;
  x = 0;
  int f = 1;
  while (c = getchar(), c < 48)
    if (c == '-') f = -1;
  do x = x * 10 + (c ^ 48);
  while (c = getchar(), c > 47);
  x *= f;
}
template <class v>
void nt(v x) {
  if (!x) return;
  nt(x / 10);
  putchar('0' + x % 10);
}
template <class v>
void pt(v x) {
  if (x < 0) putchar('-'), x = -x;
  if (!x)
    putchar('0');
  else
    nt(x);
}
template <class v>
void ptn(v x) {
  pt(x);
  putchar('\n');
}
template <class v>
void pts(v x) {
  pt(x);
  putchar(' ');
}
template <class v>
void pp(v x, int f) {
  static char ch[] = {" \n	"};
  pt(x);
  putchar(ch[f]);
}
template <class v>
inline void Max(v &x, v y) {
  if (x < y) x = y;
}
template <class v>
inline void Min(v &x, v y) {
  if (x > y) x = y;
}
const int maxn = 3005;
int n, p, q, tot;
int dp[maxn][maxn];
int id[maxn][maxn];
int dp2[maxn][maxn];
int id2[maxn][maxn];
struct node {
  int x, y, z;
} a[maxn];
bool cmp(node a, node b) { return a.x > b.x; }
bool cmp2(node a, node b) { return a.y > b.y; }
int main() {
  sc(n);
  sc(p);
  sc(q);
  for (int i = 1, i_ = n + 1; i < i_; i++) sc(a[i].x);
  for (int i = 1, i_ = n + 1; i < i_; i++) sc(a[i].y), a[i].z = i;
  sort(a + 1, a + n + 1, cmp);
  int ans = -1, pos, cnt;
  for (int i = (n + 1) - 1, i_ = 1; i >= i_; i--) {
    int ii = n - i + 1;
    for (int j = (ii)-1, j_ = 0; j >= j_; j--) {
      if (dp2[i][j + 1] < dp2[i + 1][j] + a[i].y) {
        dp2[i][j + 1] = dp2[i + 1][j] + a[i].y, id2[i][j + 1] = a[i].z;
      }
      dp2[i][j] = dp2[i + 1][j];
      id2[i][j] = -1;
    }
  }
  for (int i = 1, i_ = p + q + 1; i < i_; i++) {
    for (int j = (i)-1, j_ = 0; j >= j_; j--) {
      if (dp[i][j + 1] < dp[i - 1][j] + a[i].y) {
        dp[i][j + 1] = dp[i - 1][j] + a[i].y;
        id[i][j + 1] = a[i].z;
      }
      dp[i][j] = dp[i - 1][j] + a[i].x;
      id[i][j] = -1;
    }
    if (i >= p) {
      int res = dp[i][i - p] + dp2[i + 1][p + q - i];
      if (ans < res) {
        ans = res;
        pos = i;
        cnt = i - p;
      }
    }
  }
  ptn(ans);
  vector<int> d[2];
  int pos_ = pos, cnt_ = cnt;
  while (pos) {
    if (id[pos][cnt] == -1)
      d[0].push_back(a[pos].z);
    else
      d[1].push_back(a[pos].z), --cnt;
    --pos;
  }
  pos = pos_ + 1;
  cnt = q - cnt_;
  while (pos <= n) {
    if (id2[pos][cnt] != -1) d[1].push_back(a[pos].z), --cnt;
    ++pos;
  }
  sort(d[0].begin(), d[0].end());
  sort(d[1].begin(), d[1].end());
  for (int i = 0, i_ = d[0].size(); i < i_; i++) pp(d[0][i], i == i_ - 1);
  for (int i = 0, i_ = d[1].size(); i < i_; i++) pp(d[1][i], i == i_ - 1);
  return 0;
}