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.util.*;

public class I {
    public static void solution(BufferedReader reader, PrintWriter writer)
            throws IOException {
        In in = new In(reader);
        Out out = new Out(writer);
        int n = in.nextInt(), p = in.nextInt(), s = in.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, -in.nextInt());
        for (int i = 1; i <= n; i++)
            mcmf.addEdge(n + 2, i, 1, -in.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;
        }
        out.println(ps);
        out.println(ss);
    }

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

        @SuppressWarnings("unchecked")
        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;
        }
    }

    public static void main(String[] args) throws Exception {
        BufferedReader reader = new BufferedReader(
                new InputStreamReader(System.in));
        PrintWriter writer = new PrintWriter(
                new BufferedWriter(new OutputStreamWriter(System.out)));
        solution(reader, writer);
        writer.close();
    }

    protected static class In {
        private BufferedReader reader;
        private StringTokenizer tokenizer = new StringTokenizer("");

        public In(BufferedReader reader) {
            this.reader = reader;
        }

        public String next() throws IOException {
            while (!tokenizer.hasMoreTokens())
                tokenizer = new StringTokenizer(reader.readLine());
            return tokenizer.nextToken();
        }

        public int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        public long nextLong() throws IOException {
            return Long.parseLong(next());
        }

        public double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }

        public int[] nextIntArray(int n) throws IOException {
            int[] a = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = nextInt();
            return a;
        }

        public int[] nextIntArray1(int n) throws IOException {
            int[] a = new int[n + 1];
            for (int i = 1; i <= n; i++)
                a[i] = nextInt();
            return a;
        }

        public int[] nextIntArraySorted(int n) throws IOException {
            int[] a = nextIntArray(n);
            Random r = new Random();
            for (int i = 0; i < n; i++) {
                int j = i + r.nextInt(n - i);
                int t = a[i];
                a[i] = a[j];
                a[j] = t;
            }
            Arrays.sort(a);
            return a;
        }

        public long[] nextLongArray(int n) throws IOException {
            long[] a = new long[n];
            for (int i = 0; i < n; i++)
                a[i] = nextLong();
            return a;
        }

        public long[] nextLongArray1(int n) throws IOException {
            long[] a = new long[n + 1];
            for (int i = 1; i <= n; i++)
                a[i] = nextLong();
            return a;
        }

        public long[] nextLongArraySorted(int n) throws IOException {
            long[] a = nextLongArray(n);
            Random r = new Random();
            for (int i = 0; i < n; i++) {
                int j = i + r.nextInt(n - i);
                long t = a[i];
                a[i] = a[j];
                a[j] = t;
            }
            Arrays.sort(a);
            return a;
        }
    }

    protected static class Out {
        private PrintWriter writer;
        private static boolean local = System
                .getProperty("ONLINE_JUDGE") == null;

        public Out(PrintWriter writer) {
            this.writer = writer;
        }

        public void print(char c) {
            writer.print(c);
        }

        public void print(int a) {
            writer.print(a);
        }

        public void println(String s) {
            writer.println(s);
        }

        public void println(int a) {
            writer.println(a);
        }

        public void println(long a) {
            writer.println(a);
        }

        public void println(Object[] os) {
            for (int i = 0; i < os.length; i++) {
                writer.print(os[i]);
                writer.print(' ');
            }
            writer.println();
        }

        public void println(int[] a) {
            for (int i = 0; i < a.length; i++) {
                writer.print(a[i]);
                writer.print(' ');
            }
            writer.println();
        }

        public void println(long[] a) {
            for (int i = 0; i < a.length; i++) {
                writer.print(a[i]);
                writer.print(' ');
            }
            writer.println();
        }

        public static void db(Object... objects) {
            if (local)
                System.out.println(Arrays.deepToString(objects));
        }
    }
}