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 edge {
  int to, f, c, cost;
  edge() {}
  edge(int _to, int _f, int _c, int _cost) {
    to = _to;
    f = _f;
    c = _c;
    cost = _cost;
  }
};
edge ed[10000010];
vector<int> g[101010];
int cur, n;
char inq[101010];
int dist[101010];
pair<int, int> pai[101010];
void add_edge(int u, int v, int cap, int rcap, int cost) {
  ed[cur] = edge(v, 0, cap, cost);
  g[u].push_back(cur++);
  ed[cur] = edge(u, 0, rcap, -cost);
  g[v].push_back(cur++);
}
bool spfa(int src, int sink) {
  queue<int> q;
  memset(inq, 0, sizeof inq);
  for (int i = 0; i < n + 5; i++) {
    dist[i] = 1e9;
  }
  dist[src] = 0;
  q.push(src);
  inq[src] = 1;
  int u, v, idx, cap, cost;
  while (!q.empty()) {
    u = q.front();
    q.pop();
    inq[u] = 0;
    for (int i = 0; i < (int)g[u].size(); i++) {
      idx = g[u][i];
      v = ed[idx].to;
      cap = ed[idx].c - ed[idx].f;
      cost = ed[idx].cost;
      if (dist[u] + cost < dist[v] && cap > 0) {
        dist[v] = dist[u] + cost;
        pai[v] = make_pair(u, idx);
        if (inq[v]) continue;
        inq[v] = 1;
        q.push(v);
      }
    }
  }
  return dist[sink] != 1e9;
}
pair<int, int> augment(int src, int sink) {
  int mn = 1e9, u = sink;
  int cost = 0;
  int cap;
  while (u != src) {
    cap = ed[pai[u].second].c - ed[pai[u].second].f;
    mn = min(mn, cap);
    u = pai[u].first;
  }
  u = sink;
  while (u != src) {
    ed[pai[u].second].f += mn;
    ed[(pai[u].second) ^ 1].f -= mn;
    cost += (mn * ed[pai[u].second].cost);
    u = pai[u].first;
  }
  return make_pair(mn, cost);
}
pair<int, int> mcmf(int src, int sink) {
  pair<int, int> ans = make_pair(0, 0);
  pair<int, int> aux;
  int cnt = 0;
  while (spfa(src, sink)) {
    aux = augment(src, sink);
    ans.first += aux.first;
    ans.second += aux.second;
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int qtdProg, qtdSpo;
  vector<int> prog, spo;
  cin >> n >> qtdProg >> qtdSpo;
  cur = 0;
  int src = 0, sink = n + 3;
  add_edge(n + 1, sink, qtdProg, 0, 0);
  add_edge(n + 2, sink, qtdSpo, 0, 0);
  int x;
  for (int i = 1; i <= n; i++) {
    cin >> x;
    add_edge(src, i, 1, 0, 0);
    add_edge(i, n + 1, 1, 0, -x);
  }
  for (int i = 1; i <= n; i++) {
    cin >> x;
    add_edge(i, n + 2, 1, 0, -x);
  }
  int idx;
  cout << -mcmf(src, sink).second << "\n";
  for (int at = 1; at <= n; at++) {
    for (int i = 0; i < (int)g[at].size(); i++) {
      idx = g[at][i];
      if (idx % 2 != 0) continue;
      if (ed[idx].f == 1) {
        if (ed[idx].to == n + 1)
          prog.push_back(at);
        else
          spo.push_back(at);
      }
    }
  }
  for (int i = 0; i < (int)prog.size(); i++) {
    cout << prog[i] << " ";
  }
  cout << "\n";
  for (int i = 0; i < (int)spo.size(); i++) {
    cout << spo[i] << " ";
  }
  cout << "\n";
  return 0;
}