#include <bits/stdc++.h>
using namespace std;

#define fi first
#define se second
#define repl(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define rep(i,n) repl(i,0,n)
#define each(itr,v) for(auto itr:v)
#define pb(s) push_back(s)
//#define mp(a,b) make_pair(a,b)
#define all(x) (x).begin(),(x).end()
#define dbg(x) cout<<#x"="<<x<<endl
#define maxch(x,y) x=max(x,y)
#define minch(x,y) x=min(x,y)
#define uni(x) x.erase(unique(all(x)),x.end())
#define exist(x,y) (find(all(x),y)!=x.end())
#define bcnt(x) bitset<32>(x).count()

typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;
typedef pair<P, P> PP;
typedef pair<P,int> PPI;

#define INF INT_MAX/3

#define MAX_N 1000

//// UnionFind
struct UnionFind{
	vector<int> v;
	UnionFind(int n) : v(n, -1) {}

	int find(int x) { return v[x] < 0 ? x : v[x] = find(v[x]); }
	bool unite(int x, int y) {
		x = find(x); y = find(y);
		if (x == y) return false;
		if (-v[x] < -v[y]) swap(x, y);
		v[x] += v[y]; v[y] = x;
		return true;
	}
	bool root(int x) { return v[x] < 0; }
	bool same(int x, int y) { return find(x) == find(y); }
	int size(int x) { return -v[find(x)]; }
};

int n;
vector<PP> edge;
vector<P> point;
int dd[]={-1,0,1,0,-1};

int idlast;
map<P,int> mp;
int id(P p){
	if(mp.count(p))return mp[p];
	mp[p]=idlast++;
	return mp[p];
}

int main(){
	cin.sync_with_stdio(false);
	while(1){
		cin>>n;
		if(n==0)break;
		UnionFind uf(4*n+100);
		idlast=0;
		edge.clear(); point.clear(); mp.clear();
		rep(i,n){
			ll a,b; char c;
			cin>>a>>b>>c;
			if(c=='x'){
				edge.pb(PP(P(a,b),P(a+1,b)));
				uf.unite(id(P(a,b))+2*n,id(P(a+1,b)));
				uf.unite(id(P(a,b)),id(P(a+1,b))+2*n);
				point.pb(P(a,b)); point.pb(P(a+1,b));
			}else{
				edge.pb(PP(P(a,b),P(a,b+1)));
				uf.unite(id(P(a,b))+2*n,id(P(a,b+1)));
				uf.unite(id(P(a,b)),id(P(a,b+1))+2*n);
				point.pb(P(a,b)); point.pb(P(a,b+1));
			}
		}
		rep(i,point.size()){
			P p=point[i];
			rep(j,4){
				ll nx=p.fi+dd[j], ny=p.se+dd[j+1];
				if(!mp.count(P(nx,ny))||P(nx,ny)==point[i+(i%2?-1:1)])continue;
				uf.unite(id(p),id(P(nx,ny)));
				uf.unite(id(p)+2*n,id(P(nx,ny))+2*n);
			}
		}
		bool ok=true;
		rep(i,edge.size()){
			if(uf.same(id(edge[i].fi),id(edge[i].se))||
				uf.same(id(edge[i].fi)+2*n,id(edge[i].se)+2*n))ok=false;
		}
		if(ok)cout<<"Yes"<<endl;
		else cout<<"No"<<endl;
	}
	return 0;
}