#include <vector>
#include <string>
#include "testlib.h"
#include <iostream>
#include <algorithm>
#include <utility>
using namespace std;

int main(int argc, char **argv)
{
  registerTestlibCmd(argc, argv);
  int n = inf.readInt();
  vector <int> h(n);
  int jans = ans.readInt();
  int pans = ouf.readInt();
  if (pans > jans) {
	  quitf(_wa, "Not optimal");
  }
  for (int i = 0; i < n; ++i) {
	  h[i] = inf.readInt();
  }
  int num;
  char dest; 
  vector <bool> cut(n, false);
  for (int i = 0; i < pans; ++i) {
	  num = ouf.readInt() - 1;
	  if (num < 0 || num >= n)
		  quitp(_pe, "Bad number");
	  if (cut[num])
		  continue;
	  dest = ouf.readChar();
 	  dest = ouf.readChar();

	  if (dest == 'R') {
		  int mdist = num + h[num] - 1;
		  while (num <= mdist && num < n) {
			  cut[num] = true;
			  mdist = max(mdist, num + h[num] - 1);
			  ++num;
		  }
	  } else if (dest == 'L') {
		  int mdist = num - h[num] + 1;
		  while (num >= mdist && num >= 0) {
			  cut[num] = true;
			  mdist = min(mdist, num - h[num] + 1);
			  --num;
		  }
	  } else {
		  quitf(_pe, "Unknown direction");
	  }
  }
  bool flag = true;
  for (int i = 0; i < n; ++i) {
	  if (!cut[i])
		  flag = false;
  }
  if (!flag)
	  quitf(_wa, "There are dominoes, that doesn't fall");
  if (pans > jans)
	  quitf(_wa, "Not optimal");
  if (jans > pans)
	  quitf(_fail, "Oooops");
  quitf(_ok, "Ok!");
  return 0;
}
