conv = {?N=>[-1,0], ?S=>[1,0], ?W=>[0,-1], ?E=>[0,1]}

loop {
	h, w, l = gets.split.map &:to_i
	break if w == 0
	
	loop_start = nil
	x = y = dx = dy = nil

	maze = (1..h).map{ "#" + gets.chomp + "#" }
	maze.unshift "#" * (w+1)
	maze << "#" * (w+1)
	(1..h).each{|i|
		(1..w).each{|j|
			if maze[i][j] =~ /[NSWE]/
				dy, dx = conv[maze[i][j]]
				y = i
				x = j
				break
			end
		}
	}

	hash = {[x, y, dx, dy] => 0}
	loop {
		while maze[y+dy][x+dx] == ?#
			dx, dy = -dy, dx 
		end
		x += dx
		y += dy
		l -= 1

		break if hash[[x, y, dx, dy]] || l == 0
		hash[[x, y, dx, dy]] = hash.size
	}

	if l == 0
		puts "#{y} #{x} #{conv.invert[[dy, dx]]}"
	else
		i = hash[[x, y, dx, dy]]
		x, y, dx, dy = hash.invert[i + l % (hash.size - i)]
		puts "#{y} #{x} #{conv.invert[[dy, dx]]}"
	end
}