#include<bits/stdc++.h>
using namespace std;
typedef vector<int> vi;
const int inf=1e9;
typedef long long ll;
ll H,W,L;
int sx,sy;
string board[105];
int dx[]={0,1,0,-1};
int dy[]={-1,0,1,0};
struct State
{
	int y,x,dir;
	State(int y,int x,int dir):
	y(y),x(x),dir(dir){};
	bool operator==(const State &a) const{
		return((a.y==y)&&(a.x==x)&&(a.dir==dir));
	}
};
set<tuple<int,int,int> > st;
vector<tuple<int,int,int> > IndexState;
vector<tuple<int,int,int> > loopState;
tuple<int,int,int> laststate;
bool outrange(int y,int x)
{
	if(y<0 || y>=H || x<0 || x>=W || board[y][x]=='#') return true;
	else return false;
}

void simulation(int y,int x,int dir)
{
	int nowy=y,nowx=x;
	bool clear=false;
	while(!clear)
	{
		int ny,nx;
		while(1)
		{	
			ny=nowy+dy[dir],nx=nowx+dx[dir];
			if(!outrange(ny,nx))nowy=ny,nowx=nx;
			else 
			{
				dir=(dir+1)%4;
				continue;
			}
			auto it=st.find(make_tuple(ny,nx,dir));
			if(it!=st.end()) 
			{
				laststate=(make_tuple(ny,nx,dir));
				clear=true;
				break;
			}
			else
			{
				IndexState.push_back(make_tuple(ny,nx,dir));
				st.insert(make_tuple(ny,nx,dir));
			}
		}
	}
	return;
}

int main()
{
	int dir;
	while(cin >> H >> W >> L && H)
	{
		st.clear();
		IndexState.clear();
		loopState.clear();
		for(int i=0;i<H;i++)
		{
			cin >> board[i];
			for(int j=0;j<W;j++)
			{
				if(board[i][j]=='N') sy=i,sx=j,dir=0;
				else if(board[i][j]=='E') sy=i,sx=j,dir=1;
				else if(board[i][j]=='S') sy=i,sx=j,dir=2;
				else if(board[i][j]=='W') sy=i,sx=j,dir=3;
			}
		}
		//st.insert(make_tuple(sy,sx,dir));
		//IndexState.push_back(make_tuple(sy,sx,dir));
		simulation(sy,sx,dir);
		int mod=int(st.size());
		int beforelooplast=-1;
		for(int i=mod-1;i>=0;i--)
		{
			if(laststate==make_tuple(get<0>(IndexState[i]),get<1>(IndexState[i]),get<2>(IndexState[i])))
			{
				beforelooplast=i+1;
				loopState.push_back(make_tuple(get<0>(IndexState[i]),get<1>(IndexState[i]),get<2>(IndexState[i])));
				break;
			}
			loopState.push_back(make_tuple(get<0>(IndexState[i]),get<1>(IndexState[i]),get<2>(IndexState[i])));
		}
		if(loopState.size()!=0) reverse(loopState.begin(),loopState.end());
		/* 
		for(int i=0;i<mod;i++)
		{
			cout << get<0>(IndexState[i])+1 << ' ' << get<1>(IndexState[i])+1 << ' ' << get<2>(IndexState[i]) << endl;
		}
		cout << "LOOP" << endl;
		for(int i=0;i<int(loopState.size());i++)
		{
			cout << get<0>(loopState[i])+1 << ' ' << get<1>(loopState[i])+1 << ' ' << get<2>(loopState[i]) << endl;
		}*/
		char lastdir;
		//cout << beforelooplast << " Beforeloop" << endl;
		assert(beforelooplast!=-1);
		if(L<=beforelooplast)
		{
			if(get<2>(IndexState[(L+mod-1)%mod])==0)
			{
				lastdir='N';
			}
			if(get<2>(IndexState[(L+mod-1)%mod])==1)
			{
				lastdir='E';
			}
			if(get<2>(IndexState[(L+mod-1)%mod])==2)
			{
				lastdir='S';
			}
			if(get<2>(IndexState[(L+mod-1)%mod])==3)
			{
				lastdir='W';
			}
			cout << get<0>(IndexState[((L+mod-1)%mod)])+1 << ' ' << get<1>(IndexState[(L+mod-1)%mod])+1 << ' ' << lastdir<< endl;
		}
		else
		{
			L-=beforelooplast;
			mod=int(loopState.size());
			if(get<2>(loopState[(L)%mod])==0)
			{
				lastdir='N';
			}
			if(get<2>(loopState[(L)%mod])==1)
			{
				lastdir='E';
			}
			if(get<2>(loopState[(L)%mod])==2)
			{
				lastdir='S';
			}
			if(get<2>(loopState[(L)%mod])==3)
			{
				lastdir='W';
			}
			cout << get<0>(loopState[((L)%mod)])+1 << ' ' << get<1>(loopState[(L)%mod])+1 << ' ' << lastdir<< endl;
		}
		
	}
}



Measured memory_bytes: 3708