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 JAVA):

Solution:
import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class Main {

    public static void main(String[] args) throws IOException {
        new Main().solve();
    }

    int mod = 1000000007;

    PrintWriter out;

    int n;
    int m;

    int inf = 2000000000;

    ArrayList<Integer>[] g = new ArrayList[50000];
    Edge[] edges = new Edge[50000];

    void solve() throws IOException {

        Reader in;

        try {

            in = new Reader("input.txt");
            out = new PrintWriter( new BufferedWriter(new FileWriter("output.txt")) );
        }
        catch (Exception e) {

            in = new Reader();
            out = new PrintWriter( new BufferedWriter(new OutputStreamWriter(System.out)) );
        }

        //BufferedReader br = new BufferedReader( new FileReader("input.txt") );
        //BufferedReader br = new BufferedReader( new InputStreamReader( System.in ) );

        for (int i = 0; i < 10000; i++)
            g[i] = new ArrayList<>();

        int n = in.nextInt();
        int p = in.nextInt();
        int s = in.nextInt();

        int[] a = new int[n];
        int[] b = new int[n];

        for (int i = 0; i < n; i++)
            a[i] = in.nextInt();

        for (int i = 0; i < n; i++)
            b[i] = in.nextInt();

        int vP = n+1;
        int vS = n+2;
        int fin = n+3;
        addEdge(0, vP, p, 0);
        addEdge(0, vS, s, 0);

        for (int i = 0; i < n; i++) {

            addEdge(vP, i+1, 1, -a[i]);
            addEdge(vS, i+1, 1, -b[i]);
            addEdge(i+1, fin, 1, 0);
        }

        out.println(-minCost(0, n+3, n+4));

        ArrayList<Integer> ansP = new ArrayList<>();
        ArrayList<Integer> ansS = new ArrayList<>();

        for (int i = 0; i < cnt; i += 2) {

            Edge e = edges[i];
            if (e.v == vP && e.u > 0 && e.w == 0) {
                ansP.add(e.u);
            }
            else
            if (e.v == vS && e.u > 0 && e.w == 0) {
                ansS.add(e.u);
            }
        }

        for (int k : ansP)
            out.print(k+" ");
        out.println();
        for (int k : ansS)
            out.print(k+" ");

        out.flush();
        out.close();
    }

    int cnt = 0;
    void addEdge(int v, int u, int w, int c) {

        edges[cnt] = new Edge(v, u, w, c);
        edges[cnt^1] = new Edge(u, v, 0, -c);
        g[v].add(cnt);
        g[u].add(cnt^1);
        cnt += 2;
    }

    long minCost(int s, int t, int n) {

        long inf = 1000000000000000L;

        long cost = 0;
        int[] p = new int[n];

        while (fb(s, t, n, p)) {

            long df = inf;
            int cur = t;
            while (p[cur] != -1) {

                df = Math.min(df, edges[p[cur]].w);
                cur = edges[p[cur]].v;
            }

            cur = t;
            while (p[cur] != -1) {

                edges[p[cur]].w -= df;
                edges[p[cur]^1].w += df;
                cost += edges[p[cur]].c;
                cur = edges[p[cur]].v;
            }
        }

        return cost;
    }

    boolean fb(int s, int t, int n, int[] p) {

        long inf = 1000000000000000L;

        Arrays.fill(p, -1);
        long[] d = new long[n];
        Arrays.fill(d, inf);

        d[s] = 0;
        boolean[] inQueue = new boolean[n];
        Queue<Integer> q = new LinkedList<>();
        q.add(s);
        inQueue[s] = true;

        while (!q.isEmpty()) {

            int v = q.poll();
            inQueue[v] = false;
            for (int e : g[v]) {

                Edge edge = edges[e];
                if (edge.w > 0 && d[edge.u] > d[v]+edge.c) {

                    d[edge.u] = d[v]+edge.c;
                    p[edge.u] = e;
                    if (!inQueue[edge.u])
                        q.add(edge.u);
                    inQueue[edge.u] = true;
                }
            }
        }

        return d[t] != inf;
    }

    class Edge { int v, u; int w; long c; Edge(int v, int u, int w, long c) { this.v = v; this.u = u; this.w = w; this.c = c; } }

    class Pair implements Comparable<Pair>{

        int a;
        int b;

        Pair(int a, int b) {

            this.a = a;
            this.b = b;
        }

        public int compareTo(Pair p) {

            return a == p.a ? Integer.compare(b, p.b) : Integer.compare(p.a, a);
        }
    }

    class Item {

        int a;
        int b;
        int c;

        Item(int a, int b, int c) {
            this.a = a;
            this.b = b;
            this.c = c;
        }

    }

    class Reader {

        BufferedReader  br;
        StringTokenizer tok;

        Reader(String file) throws IOException {
            br = new BufferedReader( new FileReader(file) );
        }

        Reader() throws IOException {
            br = new BufferedReader( new InputStreamReader(System.in) );
        }

        String next() throws IOException {

            while (tok == null || !tok.hasMoreElements())
                tok = new StringTokenizer(br.readLine());
            return tok.nextToken();
        }

        int nextInt() throws NumberFormatException, IOException {
            return Integer.valueOf(next());
        }

        long nextLong() throws NumberFormatException, IOException {
            return Long.valueOf(next());
        }

        double nextDouble() throws NumberFormatException, IOException {
            return Double.valueOf(next());
        }

        String nextLine() throws IOException {
            return br.readLine();
        }

    }
}