#include using namespace std; int main(){ int n; while(cin >> n){ if(n == 0){ break; } bool stone[24][24]; for(int i=0; i<=20; i++){ for(int j=0; j<=20; j++){ stone[i][j] = false; } } for(int i=0; i> x >> y; stone[x][y] = true; } int M, count=0; int posx = 10, posy =10; cin >> M; while(M--){ char D; int len, d; cin >> D >> len; d = 1; switch(D){ case 'S': d = -1; case 'N': for(int i=0; i