#include <iostream>
#include <vector>
#include <array>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <tuple>
#include <bitset>
#include <memory>
#include <cmath>
#include <algorithm>
#include <functional>
#include <iomanip>
#include <numeric>
#include <climits>
#include <cfloat>
#include <cassert>
enum class Direction {
	North, East, South, West
};
Direction from_int(const int n) {
	switch (n % 4) {
	case 0: return Direction::North;
	case 1: return Direction::East;
	case 2: return Direction::South;
	case 3: return Direction::West;
	default: throw 0;
	}
}
int to_int(const Direction dir) {
	switch (dir) {
	case Direction::North: return 0;
	case Direction::East: return 1;
	case Direction::South: return 2;
	case Direction::West: return 3;
	default: throw 0;
	}
}
Direction turn(const Direction current, const char order) {
	switch (order) {
	case 'L': return from_int(to_int(current) + 3);
	case 'R': return from_int(to_int(current) + 1);
	default: throw 0;
	}
}
struct Coordinate {
	int x, y;
	Coordinate move(const Direction dir) const {
		switch (dir) {
		case Direction::North: return Coordinate{ x, y - 1 };
		case Direction::East: return Coordinate{ x + 1, y };
		case Direction::South: return Coordinate{ x, y + 1 };
		case Direction::West: return Coordinate{ x - 1, y };
		default: throw 0;
		}
	}
};
int main() {
	while (true) {
		int h, w, n; std::cin >> h >> w >> n; if (h == 0 && w == 0 && n == 0) break;
		std::string order; std::cin >> order;
		std::vector<Direction> directions{ Direction::North };
		for (const char c : order) {
			directions.push_back(turn(directions.back(), c));
		}
		std::vector<std::vector<int>> next_direction(n + 1);
		{
			std::vector<int> prev{ n + 1, n + 1, n + 1, n + 1};
			for (int i = n; i >= 0; --i) {
				prev[to_int(directions[i])] = i;
				next_direction[i] = prev;
			}
		}
		std::vector<std::string> state(h); for (auto& line : state) std::cin >> line;
		Coordinate start{ -1, -1 }, goal{ -1, -1 };
		for (auto y = 0; y < h; ++y) for (auto x = 0; x < w; ++x) {
			if (state[y][x] == 'S') start = Coordinate{ x, y };
			if (state[y][x] == 'G') goal = Coordinate{ x, y };
		}
		std::vector<std::vector<std::vector<int>>> min_step(h, std::vector<std::vector<int>>(w, std::vector<int>(4, INT_MAX))); min_step[start.y][start.x][to_int(Direction::North)] = 0;
		std::vector<std::queue<Coordinate>> history(n + 1); history[0].push(start);
		bool can_reach = false;
		for (auto i = 0; i <= n && !can_reach; ++i) {
			while (!history[i].empty()) {
				const auto top = history[i].front(); history[i].pop();
				if (min_step[top.y][top.x][to_int(directions[i])] != i) continue;
				const auto next_pos = top.move(directions[i]);
				if (0 <= next_pos.y && next_pos.y < h && 0 <= next_pos.x && next_pos.x < w && state[next_pos.y][next_pos.x] != '#') {
					if (min_step[next_pos.y][next_pos.x][to_int(directions[i])] > i) {
						min_step[next_pos.y][next_pos.x][to_int(directions[i])] = i;
						if (next_pos.x == goal.x && next_pos.y == goal.y) {
							can_reach = true;
							break;
						}
						history[i].emplace(next_pos);
					}
				}
				for (const auto next_dir : next_direction[i]) if (next_dir <= n) {
					if (min_step[top.y][top.x][to_int(directions[next_dir])] > next_dir) {
						min_step[top.y][top.x][to_int(directions[next_dir])] = next_dir;
						history[next_dir].emplace(top);
					}
				}
			}
		}
		if (can_reach || std::any_of(min_step[goal.y][goal.x].begin(), min_step[goal.y][goal.x].end(), [](const int step) {return step != INT_MAX; })) {
			std::cout << "Yes\n";
		}
		else {
			std::cout << "No\n";
		}
	}
}



Measured memory_bytes: 60776