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.util.*;
import java.io.*;
public class I 
{
	public static void main(String[] arg) throws IOException
	{
		new I();
	}
	public I() throws IOException
	{
		FastScanner in = new FastScanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int n = in.nextInt();
		int p = in.nextInt();
		int s = in.nextInt();
		MinCostFlow4 g = new MinCostFlow4(n+2);
		int pt = n;
		int st = n+1;
		int src = n+2;
		int dest = n+3;
		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();
		for(int i = 0; i < n; i++)
		{
			g.add(src, i, 1, 0);
			g.add(i, pt, 1, -a[i]);
			g.add(i, st, 1, -b[i]);
		}
		g.add(pt, dest, p, 0);
		g.add(st, dest, s, 0);
		long[] f = g.minCostMaxFlow();
		out.println(-f[1]);
		ArrayList<Integer> programmingTeam = new ArrayList<Integer>();
		ArrayList<Integer> sportsTeam = new ArrayList<Integer>();
		for(int i = 0; i < n; i++)
		{
			for(Edge e : g.adj[i])
			{
				if(e.end == pt && e.capacity == 0)
				{
					programmingTeam.add(i+1);
				}
				if(e.end == st && e.capacity == 0)
				{
					sportsTeam.add(i+1);
				}
			}
		}
		for(int v : programmingTeam) out.print(v + " ");
		out.println();
		for(int v : sportsTeam) out.print(v + " ");
		out.println();
		in.close(); out.close();
	}
	class MinCostFlow4
	{
		public final long INF1 = 1000000000;
		public final long INF2 = 100000000;
		
		public ArrayList<Edge>[] adj;
		public int source;
		public int sink;
		public int metaSource;
		public int metaSink;
		public Edge[] prev;
		public long[] width;
		public long[] pi;
		
//		public static void main(String[] args)
//		{
//			Scanner in = new Scanner(System.in);
//			
//			int v = in.nextInt();
//			int e = in.nextInt();
//			
//			MinCostFlow4 mcf = new MinCostFlow4(v);
//			
//			for(int x = 0; x < e; x++)	
//			{
//				add(in.nextInt(), in.nextInt(), in.nextInt(), in.nextInt());
//			}
//			
//			int s = in.nextInt();
//			for(int y = 0; y < s; y++)
//			{
//				add(source, in.nextInt(), in.nextInt(), 0);
//			}
//			
//			int d = in.nextInt();
//			for(int z = 0; z < d; z++)
//			{
//				add(in.nextInt(), sink, in.nextInt(), 0);
//			}
//			
//			long result = minCostFlow();
//			
//			System.out.println(result);
//		}
		
		public MinCostFlow4(int n)
		{
			source = n++;
			sink = n++;
			metaSource = n++;
			metaSink = n++;
			adj = new ArrayList[n];
			for(int i = 0; i < adj.length; i++)
			{
				adj[i] = new ArrayList<Edge>();
			}
		}
		
		public Edge add(int a, int b, long cap, long c)
		{
			Edge e1 = new Edge(a, b, cap, c);
			Edge e2 = new Edge(b, a, 0, -c);
			e1.rev = e2;
			e2.rev = e1;
			adj[a].add(e1);
			adj[b].add(e2);
			
			return e1;
		}
		
		public long[] minCostMaxFlowNegCycles()
		{
			Edge flow = add(sink, source, INF1, -INF2);
			
			long cost = minCostFlow();
			
			return new long[] {INF1 - flow.capacity, cost + INF2 * (INF1 - flow.capacity)};
		}
		
		public long minCostFlow()
		{
			long result = 0;
			long[] val = new long[adj.length];
			for(int i = 0; i < adj.length; i++)
			{
				for(Edge e : adj[i])
				{
					if(e.capacity > 0 && e.cost < 0)
					{
						result += e.capacity * e.cost;
						val[e.start] -= e.capacity;
						val[e.end] += e.capacity;
						e.rev.capacity = e.capacity;
						e.capacity = 0;
					}
				}
			}
			
			for(int i = 0; i < val.length; i++)
			{
				if(val[i] > 0)
				{
					add(metaSource, i, val[i], 0);
				}
				else if(val[i] < 0)
				{
					add(i, metaSink, -val[i], 0);
				}
			}
			
			// add(sink, source, INF1, 0);	// for min cost flow with source and sink
			
			source = metaSource;
			sink = metaSink;
			
			return result + minCostMaxFlow()[1];
		}
		
		public long[] minCostMaxFlow()
		{
			long flow = 0;
			long cost = 0;
			
			getPotential();
			
			while(findPath())
			{
				flow += width[sink];
				cost += update();
			}
			
			return new long[] {flow, cost};
		}
		
		public void getPotential()
		{
			pi = new long[adj.length];
			Arrays.fill(pi, INF1);
			pi[source] = 0;
			
			for(int i = 0; i < adj.length - 1; i++)
			{
				boolean update = false;
				for(int j = 0; j < adj.length; j++)
				{
					for(Edge e : adj[j])
					{
						if(e.capacity > 0 && pi[e.start] + e.cost < pi[e.end])
						{
							pi[e.end] = pi[e.start] + e.cost;
							update = true;
						}
					}
				}
				
				if(!update)
				{
					break;
				}
			}
		}
		
		public boolean findPath()
		{
			long[] dist = new long[adj.length];
			Arrays.fill(dist, INF1);
			dist[source] = 0;
			
			prev = new Edge[adj.length];
			
			width = new long[adj.length];
			Arrays.fill(width, INF1);
			
			PriorityQueue<Node> pq = new PriorityQueue<Node>();
			pq.add(new Node(source, 0));
			
			while(pq.size() > 0)
			{
				Node node = pq.poll();
				
				if(node.dist == dist[node.index])
				{
					for(Edge e : adj[node.index])
					{
						long newDist = dist[node.index] + e.cost + pi[e.start] - pi[e.end];
						if(e.capacity > 0 && newDist < dist[e.end])
						{
							dist[e.end] = newDist;
							prev[e.end] = e;
							width[e.end] = Math.min(width[node.index], e.capacity);
							pq.add(new Node(e.end, newDist));
						}
					}
				}
			}
			
			for(int i = 0; i < pi.length; i++)
			{
				pi[i] += dist[i];
			}
			
			return (dist[sink] < INF1);
		}
		
		public long update()
		{
			int node = sink;
			long current = 0;
			while(prev[node] != null)
			{
				prev[node].capacity -= width[sink];
				prev[node].rev.capacity += width[sink];
				current += width[sink] * prev[node].cost;
				node = prev[node].start;
			}
			
			return current;
		}
		
		class Node implements Comparable<Node>
		{
			int index;
			long dist;
			
			public Node(int i, long d)
			{
				index = i;
				dist = d;
			}
			
			public int compareTo(Node o)
			{
				return Long.compare(dist, o.dist);
			}
		}
	}
	class Edge
	{
		int start;
		int end;
		long capacity;
		long cost;
		Edge rev;
		
		public Edge(int s, int e, long cap, long c)
		{
			start = s;
			end = e;
			capacity = cap;
			cost = c;
		}
	}
	class FastScanner
	{
		BufferedReader br;
		StringTokenizer st;
		public FastScanner(InputStream in)
		{
			br = new BufferedReader(new InputStreamReader(in));
			st = new StringTokenizer("");
		}
		public String next() throws IOException
		{
			while(!st.hasMoreElements()) st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}
		public int nextInt() throws IOException
		{
			return Integer.parseInt(next());
		}
		public void close() throws IOException
		{
			br.close();
		}
	}
}