module Graphical
	require 'set'

	def bfs(start)
		raise "start must be Enumerable" if !start.kind_of?(Enumerable)
		reached = Set[*start.to_a]
		queue = []
		start.each{|s| queue << s}
		dist = {}
		loop.with_index {|_, depth|
			next_queue = []
			until queue.empty?
				u = queue.shift
				return depth if block_given? && yield(u, depth)
				dist[u] = depth
				each_out_connection_of(u){|v, _|
					next if reached.include?(v)
					reached << v
					next_queue << v
				}
			end
			break if next_queue.empty?
			queue = next_queue
		}
		block_given? ? nil : dist
	end
end

extend Graphical

$dij = [
	[-1, 0],
	[0, 1],
	[1, 0],
	[0, -1],
]

def each_out_connection_of(u)
	i, j, c, dir = u
	rest_dir = (0..3).to_a - [dir]
	new_dir = dir
	(c..$commands.size-1).each do |k|
		new_dir += 1 if $commands[k] == ?R
		new_dir -= 1 if $commands[k] == ?L
		new_dir %= 4
		next if ! rest_dir.include?(new_dir)
		rest_dir.delete(new_dir)

		di, dj = $dij[new_dir]
		step = 1
		loop do
			new_i, new_j = i + step * di, j + step * dj
			break if new_i < 0 || new_i >= $a.size
			break if new_j < 0 || new_j >= $a[0].size
			break if $a[new_i][new_j] == ?#
			yield([new_i, new_j, k+1, new_dir], 1)
			step += 1
		end
		
		break if rest_dir.empty?
	end
end

loop do
	h, w, n = gets.split.map(&:to_i)
	break if h == 0
	$commands = gets.chomp
	$a = (0..h-1).map { gets.chomp.split("") }

	starts = []
	gi, gj = nil
	(0..h-1).each do |i|
		(0..w-1).each do |j|
			if $a[i][j] == ?S
				starts << [i, j, 0, 0]
			end
			if $a[i][j] == ?G
				gi, gj = i, j
			end
		end
	end

	i, j, _, _ = starts[0]
	loop do
		i -= 1
		break if i < 0 || $a[i][j] == ?#
		starts << [i, j, 0, 0]
	end

	puts bfs(starts){|v, _| v[0] == gi && v[1] == gj} ? 'Yes' : 'No'
end