import java.io.*;
import java.util.*;

public class Interact {
    private static String fileName = "power";

    final BufferedReader stdin;
    final Scanner fin;
    final PrintWriter fout;

    int[] exactAns;
    int n;

    Interact(String inputFileName, String outputFileName) throws IOException {
	stdin = new BufferedReader(new InputStreamReader(System.in));
	fin = new Scanner(new FileReader(inputFileName));
	fout = new PrintWriter(new FileWriter(outputFileName), true);
    }

    void close() {
	fin.close();
	fout.close();
    }

    static class PresentationException extends Exception {
	PresentationException(String message) {
	    super(message);
	}
    }

    void go() {
	try {
	    fout.println(interact());
	} catch (PresentationException e) {
	    fout.println("PE " + e.getMessage());
	} catch (IOException e) {
	    fout.println("FAIL " + e.getMessage());
	}
    }

    String calc(powerQuery qu) {
	int ans = 0;
	for (int i = 0; i < n; i++)
	    ans += exactAns[i] * qu.s[i];
	return Integer.toString(ans);
    }

    String interact() throws IOException, PresentationException {
	n = fin.nextInt();
	int maxQueries = n;
	writeLine(Integer.toString(n));
	exactAns = new int[n];
	for (int i = 0; i < n; i++)
	    exactAns[i] = fin.nextInt();

	for (int queries = 0; queries <= maxQueries; queries++) {
	    Query qu = readRequest();
	    if (qu instanceof powerQuery) {
		String res = calc(((powerQuery) qu));
		writeLine(res);
	    } else if (qu instanceof AnswerQuery) {
		int[] ans = ((AnswerQuery) qu).ans;
		for (int i = 0; i < n; i++)
		    if (ans[i] != exactAns[i])
			return String
				.format("WA too imprecise (expected %d, found %d) at position %d",
					exactAns[i], ans[i], i + 1);
		return String.format("OK %d queries", queries);
	    }
	}
	return "WA queries limit reached";
    }

    static class Query {
    }

    static class powerQuery extends Query {
	int[] s;

	public powerQuery(int[] s) {
	    super();
	    this.s = s;
	}
    }

    static class AnswerQuery extends Query {
	int[] ans;

	public AnswerQuery(int[] ans) {
	    this.ans = ans;
	}
    }

    private Query readRequest() throws PresentationException, IOException {
	String line = readLine();
	String[] tokens = line.split(" ");
	if (tokens.length == n + 1 && tokens[0].equals("answer:")) {
	    try {
		int[] ans = new int[n];
		for (int i = 1; i <= n; i++)
		    ans[i - 1] = Integer.parseInt(tokens[i]);
		return new AnswerQuery(ans);
	    } catch (NumberFormatException e) {
		throw new PresentationException("answer is not a integer array");
	    }
	} else if (tokens.length == n) {
	    try {
		int[] s = new int[n];
		for (int i = 0; i < n; i++) {
		    if (tokens[i].equals("+")) {
			s[i] = 1;
		    } else if (tokens[i].equals("-")) {
			s[i] = -1;
		    } else {
			throw new NumberFormatException();
		    }
		}

		return new powerQuery(s);
	    } catch (NumberFormatException e) {
		throw new PresentationException("incorrect charecter");
	    }
	} else {
	    throw new PresentationException("incorrect query");
	}
    }

    private String readLine() throws PresentationException, IOException {
	String s = stdin.readLine();
	if (s == null) {
	    throw new PresentationException("terminated too early");
	}
//	fout.print("INP ");
//	fout.println(s);
	return s;
    }

    private void writeLine(String s) {
//	fout.print("OUT ");
//	fout.println(s);
	fout.flush();
	System.out.println(s);
	System.out.flush();
    }

    public static void main(String[] args) throws IOException {
	Locale.setDefault(Locale.US);
	Interact instance = new Interact(args.length >= 2 ? args[0]
		: "power.in", args.length >= 2 ? args[1] : "power.out");
	instance.go();
	instance.close();
    }
}
