#define NOFOOTER
#define EJUDGE
#include "testlib.h"

// ligue A

const int NMAX = 1000;

int main(int argc, char *argv[])
{
	registerTestlibCmd(argc, argv);

	int a, b, c;
	int n;
	int d[NMAX];

	a = inf.readInt();
	b = inf.readInt();
	c = inf.readInt();
	n = inf.readInt();
	for (int i = 0; i < n; i++)
		d[i] = inf.readInt();

	int cost, m;

	cost = ouf.readInt();
	m = ouf.readInt();

	if (m == -1)
	{
		if (cost != a + b)
			quitf(_wa, "Your plan does not correspond to the cost: %d vs %d", a + b, cost);
	}
	else
	{
		int cc = 0;
		int x = -1;
		int y;

		for (int i = 0; i < m; i++)
		{
			y = ouf.readInt();
			if (y < 1 || y > n)
				quitf(_wa, "Incorrect purchase number: %d", y);

			if (y <= x)
				quitf(_wa, "Purchase numbers do not increase!");

			cc += d[y - 1];
			x = y;
		}

		if (a + cc != cost)
			quitf(_wa, "Your plan does not correspond to the cost: %d vs %d", a + b, cost);

		if (cost <= c)
			quitf(_wa, "Your purchases are too cheap to get bonus!");
	}		

	int cans = ans.readInt();

	if (cans < cost)
		quitf(_wa, "Not optimal: %d vs %d", cost, cans);

	if (cost < cans)
		quitf(_fail, "Mr Korabasov, it's impossible: %d vs %d", cost, cans);

	quitf(_ok, "Nice solution: %d vs %d", cost, cans);

	return 0;   
}
