class Array
	def accum
		ac = Array.new(size + 1)
		ac[0] = 0
		(1..size).each do |i|
			ac[i] = ac[i-1] + self[i-1]
		end
		ac
	end
end

class Heap
	require 'forwardable'
	extend Forwardable

	def initialize
		@keys = []
		@items = []
		@index = {}
	end

	def add(item, key)
		@items << item
		@keys << key
		@index[item] = @keys.size - 1
		lift_up(@keys.size - 1)
	end

	def swap(i, j)
		u = @items[i]
		v = @items[j]
		@index[u], @index[v] = j, i
		@keys[i], @keys[j] = @keys[j], @keys[i]
		@items[i], @items[j] = @items[j], @items[i]
	end

	def lift_up(i)
		return if i == 0
		j = (i - 1) / 2
		if (@keys[i] <=> @keys[j]) < 0
			swap(i, j)
			lift_up(j)
		end
	end

	def del_min
		raise "heap is empty!" if empty?
		min_key = @keys[0]
		min_item = @items[0]
		if size > 1
			swap(0, @keys.size-1)
			@keys.pop
			@items.pop
			lift_down(0)
		else
			@keys.pop
			@items.pop
		end
		@index.delete(min_item)
		[min_item, min_key]
	end

	def update_key(obj, new_key)
		i = @index[obj]
		return unless i
		return if (new_key <=> @keys[i]) >= 0
		@keys[i] = new_key
		lift_up(i)
	end

	def lift_down(i)
		j = 2 * i + 1
		k = j + 1
		if k >= size
			return if j >= size
			if (@keys[i] <=> @keys[j]) > 0
				swap(i, j)
				lift_down(j)
			end
		else
			l = ((@keys[j] <=> @keys[k]) < 0 ? j : k)
			if (@keys[i] <=> @keys[l]) > 0
				swap(i, l)
				lift_down(l)
			end
		end
	end

	def include?(obj)
		@index.include?(obj)
	end

	def key(obj)
		@keys[@index[obj]]
	end

	def_delegators :@keys, :empty?, :size
end

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

loop do
	h, w, n = gets.split.map(&:to_i)
	break if h == 0
	commands = gets.chomp

	foo = commands.each_char.map {|c| (c.ord - 79) / 3}.accum.map {|x| x % 4}
	bar = [{}]
	n.times do |i|
		hash = bar[0].dup
		hash[foo[n-i]] = n-i
		bar.unshift hash
	end

	a = (0..h-1).map { gets.chomp.split("") }

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

	pq = Heap.new

	i, j = si, sj
	loop do
		pq.add([i, j], 0)
		i -= 1
		break if i < 0 || a[i][j] == ?#
	end

	min_command = {}
	while !pq.empty?
		u, c = pq.del_min
		min_command[u] = c
		i, j = u
		if i == gi && j == gj
			break
		end

		bar[c].each do |dir, k|
			next if dir == foo[c]

			di, dj = dij[dir]
			step = 1
			loop do
				new_i, new_j = i + step * di, j + step * dj
				step += 1
				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] == ?#
				v = [new_i, new_j]

				break if min_command[v]

				if pq.include?(v)
					break if pq.key(v) <= k
					pq.update_key(v, k)
				else
					pq.add(v, k)
				end
			end
		end
	end

	if min_command[[gi, gj]]
		puts 'Yes'
	else
		puts 'No'
	end
end