#include <iostream>
#include <string>
#include <vector>
#include <cstdlib>

using namespace std;

const int dx[] = { -1, 0, 1, -1, 1, -1, 0, 1 };
const int dy[] = { -1, -1, -1, 0, 0, 1, 1, 1 };

int main(){
	while(true){
		int n, m;
		cin >> n >> m;
		if(n == 0 && m == 0){ break; }
		vector<string> field(n);
		int x, y, gx = -1, gy = -1;
		for(int i = 0; i < n; ++i){
			cin >> field[i];
			size_t st = field[i].find('S');
			if(st != string::npos){
				field[i][st] = '.';
				x = st;
				y = i;
			}
			size_t goal = field[i].find('G');
			if(goal != string::npos){
				gx = goal;
				gy = i;
			}
		}
		int T, status = -1;
		cin >> T;
		if(y < n - 1 && field[y + 1][x] == 'G'){
			status = 0;
		}else if(y < n - 1 && field[y + 1][x] == 'B'){
			status = 1;
		}
		while(status < 0 && T--){
			string c1, c2;
			cin >> c1 >> c2;
			int px = x, py = y;
			if(c1 == "MOVETO"){
				int s = atoi(c2.c_str()) - 1;
				if(s < 0 || s >= m){ continue; }
				if(y == n - 1){
					if(field[y][s] == '.'){
						swap(field[y][x], field[y][s]);
						x = s;
					}else{
						continue;
					}
				}else{
					int delta = (s < x ? -1 : 1);
					bool accept = true;
					for(int i = x; i != s + delta; i += delta){
						if(field[y + 1][i] == '.'){
							accept = false;
							break;
						}
					}
					if(accept && field[y][s] == '.'){
						swap(field[y][x], field[y][s]);
						x = s;
					}else{
						continue;
					}
				}
			}else if(c1 == "PUSH"){
				int delta = (c2 == "LEFT" ? -1 : 1), last;
				bool accept = true;
				if(field[y][x + delta] == '.'){ continue; }
				for(last = x + delta; last >= 0 && last < m; last += delta){
					if(field[y][last] == 'C'){
						accept = false;
						break;
					}else if(field[y][last] == '.'){
						last -= delta;
						break;
					}
				}
				if(!accept){ continue; }
				for(int i = last; i != x; i -= delta){
					for(int j = i; j >= 0 && j < m; j += delta){
						int next = j + delta;
						if(next < 0 || next >= m){
							field[y][j] = '.';
							break;
						}
						if(field[y][next] != '.'){ break; }
						swap(field[y][next], field[y][j]);
						bool ice = (field[y][next] == 'I');
						if(y < n - 1 && field[y + 1][next] == 'I'){ ice = true; }
						if((y < n - 1 && field[y + 1][next] == '.') || !ice){
							break;
						}
					}
				}
			}else if(c1 == "PULL"){
				int delta = (c2 == "LEFT" ? 1 : -1);
				int next = x + delta, back = x - delta;
				if(next < 0 || next >= m || back < 0 || back >= m){ continue; }
				if(field[y][next] == '.' || field[y][next] == 'C'){ continue; }
				if(field[y][back] != '.'){ continue; }
				swap(field[y][x], field[y][back]);
				swap(field[y][next], field[y][x]);
				x = back;
			}else if(c1 == "GETDOWN"){
				int delta = (c2 == "LEFT" ? -1 : 1);
				if(y == n - 1){ continue; }
				int next = x + delta;
				if(field[y][next] != '.' || field[y + 1][next] != '.'){ continue; }
				swap(field[y + 1][next], field[y][x]);
				y = y + 1;
				x = next;
			}else if(c1 == "CLIMB"){
				int delta = (c2 == "LEFT" ? -1 : 1);
				if(y == 0){ continue; }
				int next = x + delta;
				if(field[y][next] == '.'){ continue; }
				if(field[y - 1][next] != '.' || field[y - 1][x] != '.'){ continue; }
				swap(field[y - 1][next], field[y][x]);
				y = y - 1;
				x = next;
			}
			if(y < n - 1){
				if(field[y + 1][x] == 'G'){
					status = 0;
					break;
				}else if(field[y + 1][x] == 'B'){
					status = 1;
					break;
				}
			}
			int cgx = -1, cgy = -1;
			for(int i = 0; i < n; ++i){
				size_t p = field[i].find('G');
				if(p != string::npos){
					cgx = p;
					cgy = i;
					break;
				}
			}
			if(cgx != gx || cgy != gy){
				status = 3;
				break;
			}
			if((y != py || x != px) && py < n - 1){
				if(isdigit(field[py + 1][px]) && --field[py + 1][px] == '0'){
					field[py + 1][px] = '.';
				}
			}
			while(true){
				bool modified = false;
				for(int i = 0; i < n - 1; ++i){
					for(int j = 0; j < m; ++j){
						if(field[i][j] == '.'){ continue; }
						if(field[i + 1][j] == 'B'){
							field[i][j] = '.';
							modified = true;
						}
					}
				}
				for(; y < n - 1; ++y){
					if(field[y + 1][x] == '.'){
						swap(field[y][x], field[y + 1][x]);
						modified = true;
					}else{
						break;
					}
				}
				for(int i = n - 2; i >= 0; --i){
					for(int j = 0; j < m; ++j){
						for(int k = i; k < n - 1; ++k){
							if(field[k][j] == '.'){ break; }
							if(j > 0 && field[k + 1][j - 1] != '.'){ break; }
							if(field[k + 1][j] != '.'){ break; }
							if(j < m - 1 && field[k + 1][j + 1] != '.'){ break; }
							swap(field[k + 1][j], field[k][j]);
							modified = true;
						}
					}
				}
				if(modified){ continue; }
				break;
			}
			cgx = -1, cgy = -1;
			for(int i = 0; i < n; ++i){
				size_t p = field[i].find('G');
				if(p != string::npos){
					cgx = p;
					cgy = i;
					break;
				}
			}
			if(cgx != gx || cgy != gy){ status = 3; }
			if(field[y][x] != '.'){ status = 2; }
			if(y < n - 1){
				if(field[y + 1][x] == 'B'){ status = 1; }
				if(field[y + 1][x] == 'G'){ status = 0; }
			}
		}
		if(T < 0){ status = 4; }
		while(T-- > 0){
			string c1, c2;
			cin >> c1 >> c2;
		}
		switch(status){
			case 0: cout << "Game Over : Cleared"; break;
			case 1: cout << "Game Over : Death by Hole"; break;
			case 2: cout << "Game Over : Death by Block"; break;
			case 3: cout << "Game Over : Death by Walking Goal"; break;
			case 4: cout << "Game Over : Gave Up"; break;
		}
		cout << endl;
	}
	return 0;
}

Measured memory_bytes: 936