#include <bits/stdc++.h>
using namespace std;
int a[3005], b[3005], c[3005], vis[3005];
bool cmp(int i, int j) { return a[i] > a[j]; }
int main() {
  vector<int> p, q;
  int T, i, j, k, ca = 0, n, m, K;
  int s, t;
  scanf("%d%d%d", &n, &s, &t);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]), c[i] = i;
  }
  for (int i = 0; i < n; i++) {
    scanf("%d", &b[i]);
  }
  sort(c, c + n, cmp);
  for (int i = 0; i < s; i++) {
    vis[c[i]] = 1;
  }
  while (t--) {
    k = 0;
    while (k < n && vis[c[k]]) k++;
    int mx = -1, v, l = c[k];
    for (int i = n - 1; i >= 0; i--) {
      j = -0x7f7f7f7f;
      if (vis[i] == 0)
        j = b[i];
      else if (vis[i] == 1)
        j = -a[i] + a[l] + b[i];
      if (j > mx) mx = j, v = i;
    }
    if (vis[v]) vis[l] = 1;
    vis[v] = 2;
  }
  int ans = 0;
  for (int i = 0; i < n; i++) {
    if (vis[i] == 1) {
      p.push_back(i + 1);
      ans += a[i];
    } else if (vis[i] == 2) {
      q.push_back(i + 1);
      ans += b[i];
    }
  }
  printf("%d\n", ans);
  for (auto it : p) {
    printf("%d ", it);
  }
  puts("");
  for (auto it : q) {
    printf("%d ", it);
  }
  puts("");
  return 0;
}
