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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.StringTokenizer;

public class TaskI {
    StringTokenizer st;
    BufferedReader in;
    PrintWriter out;

    public static void main(String[] args) throws IOException {
        TaskI task = new TaskI();
        task.open();
        task.solve();
        task.close();

    }

    class MCMF {
        int n, s, t;
        ArrayList<Edge> e;
        ArrayList<Integer>[] adj;
        int[] d, pre;
        boolean[] visited;
        int INF = 1000 * 1000 * 1000;
        int mc = 0, mf = 0;


        public MCMF(int n, int s, int t) {
            super();
            this.n = n;
            this.s = s;
            this.t = t;
            e = new ArrayList<Edge>();
            adj = new ArrayList[n];
            for (int i = 0; i < n; i++)
                adj[i] = new ArrayList<Integer>();
            d = new int[n];
            pre = new int[n];
        }

        public void addEdge(int u, int v, int c, int w) {
            Edge e1 = new Edge(v, c, w);
            adj[u].add(e.size());
            e.add(e1);
            Edge e2 = new Edge(u, 0, -w);
            adj[v].add(e.size());
            e.add(e2);
        }

        public int mcmf() {
            while (spfa()) {
                int f;
                do {
                    visited = new boolean[n];
                    f = findflow(s, Integer.MAX_VALUE);
                    mf += f;
                    mc += f * d[t];
                } while (f > 0);
            }
            return mf;
        }

        private int findflow(int u, int min) {
            visited[u] = true;
            if (u == t)
                return min;
            for (Integer ei : adj[u]) {
                Edge edge = e.get(ei);
                if (!visited[edge.v] && edge.c - edge.f > 0
                        && d[u] + edge.w == d[edge.v]) {
                    int f = findflow(edge.v, Math.min(min, edge.c - edge.f));
                    if (f > 0) {
                        edge.f += f;
                        e.get(ei ^ 1).f -= f;
                        return f;
                    }
                }
            }
            return 0;
        }

        private boolean spfa() {
            Arrays.fill(d, INF);
            boolean[] inq = new boolean[n];
            d[s] = 0;
            LinkedList<Integer> queue = new LinkedList<Integer>();
            queue.add(s);
            while (!queue.isEmpty()) {
                int u = queue.removeFirst();
                inq[u] = false;
                for (Integer ei : adj[u]) {
                    Edge edge = e.get(ei);
                    if (edge.c - edge.f > 0 && d[u] + edge.w < d[edge.v]) {
                        d[edge.v] = d[u] + edge.w;
                        pre[edge.v] = ei;
                        if (!inq[edge.v]) {
                            queue.add(edge.v);
                            inq[edge.v] = true;
                        }
                    }
                }
            }
            return d[t] != INF;
        }
    }

    protected static class Edge {
        protected int v, c, f = 0, w;

        public Edge(int v, int c, int w) {
            super();
            this.v = v;
            this.c = c;
            this.w = w;
        }
    }


    private void close() {
        out.flush();
    }


    private void solve() throws IOException {
        int n = nextInt();
        int p = nextInt();
        int s = nextInt();
        MCMF mcmf = new MCMF(n + 4, 0, n + 3);
        mcmf.addEdge(0, n + 1, p, 0);
        mcmf.addEdge(0, n + 2, s, 0);
        for (int i = 1; i <= n; i++)
            mcmf.addEdge(n + 1, i, 1, -nextInt());
        for (int i = 1; i <= n; i++)
            mcmf.addEdge(n + 2, i, 1, -nextInt());
        for (int i = 1; i <= n; i++)
            mcmf.addEdge(i, n + 3, 1, 0);
        mcmf.mcmf();
        out.println(-mcmf.mc);
        int[] ps = new int[p], ss = new int[s];
        int pi = 0, si = 0;
        for (Integer ei : mcmf.adj[n + 1]) {
            Edge e = mcmf.e.get(ei);
            if (e.f == 1 && e.v != 0)
                ps[pi++] = e.v;
        }
        for (Integer ei : mcmf.adj[n + 2]) {
            Edge e = mcmf.e.get(ei);
            if (e.f == 1 && e.v != 0)
                ss[si++] = e.v;
        }
        for (int i = 0; i < ps.length; i++) {
            out.print(ps[i] + " ");

        }
        out.println();
        for (int i = 0; i < ss.length; i++) {
            out.print(ss[i] + " ");
        }


    }

    private void open() {
        in = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
    }

    private String nextToken() throws IOException {
        while (st == null || !st.hasMoreTokens()) {
            String line = in.readLine();
            if (line == null) return null;
            st = new StringTokenizer(line);
        }
        return st.nextToken();
    }

    private int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    private double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    private long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

}