// Arup Guha
// 12/27/2024
// Solution to 2024 SER D1/D2 Problem K: Optimized Cheating

import java.util.*;
import java.io.*;

public class optimizedcheating {

	public static HashSet<Long> taken;
	public static int numOps;
	public static long startVal;
	public static char[] ops;
	public static long[] vals;
	
	public static void main(String[] args) throws Exception {
	
		BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer tok = new StringTokenizer(stdin.readLine());
		
		// Get basic input.
		int n = Integer.parseInt(tok.nextToken());
		taken = new HashSet<Long>();
		numOps = Integer.parseInt(tok.nextToken());
		int k = Integer.parseInt(tok.nextToken()) - 1;
		
		// Add all the previous numbers into the set we're trying to avoid.
		for (int i=0; i<k; i++) {
			long tmp = Long.parseLong(stdin.readLine().trim());
			taken.add(tmp);
		}
		
		// This is my starting value.
		startVal = Long.parseLong(stdin.readLine().trim());
		
		// Add all the rest of the numbers into the set we're trying to avoid.
		for (int i=k+1; i<n; i++) {
			long tmp = Long.parseLong(stdin.readLine().trim());
			taken.add(tmp);
		}

		// Store operations.
		ops = new char[numOps];
		vals = new long[numOps];
		for (int i=0; i<numOps; i++) {
			tok = new StringTokenizer(stdin.readLine());
			ops[i] = tok.nextToken().charAt(0);
			vals[i] = Long.parseLong(tok.nextToken());
		}
		
		// Run BFS.
		ArrayList<Integer> res = bfs();
		
		// Output corresponding result.
		if (res == null)
			System.out.println(-1);
		else {
			System.out.println(res.size());
			for (int i=0; i<res.size(); i++)
				System.out.println(res.get(i));
		}
	}
	
	public static ArrayList<Integer> bfs() {
		
		// Will store the distance from startVal to each reachable value.
		HashMap<Long,Integer> dist = new HashMap<Long,Integer>();
		
		// Will store the operation that got us to each reachable value.
		HashMap<Long,Integer> prevOp = new HashMap<Long,Integer>();
		HashMap<Long,Long> prevVal = new HashMap<Long,Long>();
		
		// Set up BFS.
		ArrayDeque<Long> q = new ArrayDeque<Long>();
		q.offer(startVal);
		dist.put(startVal, 0);
		prevOp.put(startVal, -1);
		prevVal.put(startVal, -1L);
		long reached = -1;
		
		// Start BFS.
		while (q.size() > 0) {
			
			// Get next item.
			long cur = q.poll();
			int curD = dist.get(cur);
			
			// Get out.
			if (!taken.contains(cur)) {
				reached = cur;
				break;
			}
			
			// Try each operation.
			for (int i=0; i<numOps; i++) {
				
				//ops,vals
				long next = getNext(cur, ops[i], vals[i]);
				
				// Can't go negative.
				if (next < 0) continue;
				
				// We've been here before.
				if (dist.containsKey(next)) continue;
				
				// Add to queue.
				q.offer(next);
				
				// Update distance, operation.
				dist.put(next, curD+1);
				prevOp.put(next, i+1);
				prevVal.put(next, cur);
			}
		}
		
		// Get this case out of the way.
		if (reached == -1) return null;
			
		// Now do the build back.
		ArrayList<Integer> res = new ArrayList<Integer>();
		while (reached != startVal) {
			res.add(prevOp.get(reached));
			reached = prevVal.get(reached);
		}
		
		// Ta da!
		Collections.reverse(res);
		return res;
	}
	
	public static long getNext(long cur, char op, long val) {
		
		// Trying to avoid overflow.
		if (cur > 1000000000L && op == '*') return -1;
		
		// Otherwise this should be okay.
		if (op == '+') return cur+val;
		if (op == '-') return cur-val;
		if (op == '*') return cur*val;
		return cur/val;
	}
}