#include "bits/stdc++.h"

#define REP(i,n) for(ll i=0;i<ll(n);++i)
#define RREP(i,n) for(ll i=ll(n)-1;i>=0;--i)
#define FOR(i,m,n) for(ll i=m;i<ll(n);++i)
#define RFOR(i,m,n) for(ll i=ll(n)-1;i>=ll(m);--i)
#define ALL(v) (v).begin(),(v).end()
#define UNIQUE(v) v.erase(unique(ALL(v)),v.end());
#define INF 1000000001ll
#define MOD 1000000007ll
#define EPS 1e-9

constexpr int dx[8] = { 1,1,0,-1,-1,-1,0,1 };
constexpr int dy[8] = { 0,1,1,1,0,-1,-1,-1 };


using namespace std;

using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
using vvi = vector<vi>;
using vvl = vector<vl>;
using pii = pair<int, int>;
using pll = pair<ll, ll>;

template <class T> bool chmin(T& a, const T& b) { if (a > b) { a = b; return true; } return false; }
template <class T> bool chmax(T& a, const T& b) { if (a < b) { a = b; return true; } return false; }

#include "bits/stdc++.h"
struct UnionFind {
	std::vector<int> par;
	std::vector<int> sizes;

	UnionFind(int n) {
		par.resize(n);
		sizes.resize(n);
		for (int i = 0; i < n; ++i) {
			par[i] = i;
			sizes[i] = 1;
		}
	}

	int root(int a) {
		return par[a] == a ? a : par[a] = root(par[a]);
	}

	bool same(int x, int y) {
		return root(x) == root(y);
	}

	void unite(int x, int y) {
		x = root(x);
		y = root(y);
		if (x == y)return;
		if (sizes[x] < sizes[y]) std::swap(x, y);

		par[y] = x;
		sizes[x] += sizes[y];
	}
	int size(int x) {
		return sizes[root(x)];
	}
};


int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	int n;
	while (cin >> n, n) {
		int m = 2 * n;
		vector<pair<pii, int>> v;

		vvi g(m);

		REP(i, n) {
			int x, y;
			cin >> x >> y;
			char c; cin >> c;
			pii a = { x,y }, b = a;
			if (c == 'x') {
				b.first++;
			}
			else {
				b.second++;
			}
			v.push_back({ a,2 * i });
			v.push_back({ b,2 * i + 1 });
		}
		vi c(m, -1);
		sort(ALL(v));
		REP(i, m - 1) {
			if (v[i].first.first == v[i + 1].first.first && v[i].first.second + 1 == v[i + 1].first.second) {
				g[v[i].second].push_back(v[i + 1].second);
				g[v[i + 1].second].push_back(v[i].second);
			}
		}
		sort(ALL(v), [&](auto a, auto b) {if (a.first.second == b.first.second)return a.first.first < b.first.first; return a.first.second < b.first.second; });
		REP(i, m - 1) {
			if (v[i].first.first + 1 == v[i + 1].first.first && v[i].first.second == v[i + 1].first.second) {
				g[v[i].second].push_back(v[i + 1].second);
				g[v[i + 1].second].push_back(v[i].second);
			}
		}
		REP(i, m) {
			sort(ALL(g[i]));
			UNIQUE(g[i]);
		}
		bool ok = true;
		queue<int> q;
		REP(i, m) {
			if (c[i] != -1)continue;
			q.push(i);
			c[i] = 0;

			while (!q.empty()) {
				int p = q.front(); q.pop();
				REP(i, g[p].size()) {
					if (c[g[p][i]] != -1) {
						if (p & 1 && g[p][i] == p - 1) {
							if (c[p] == c[g[p][i]])ok = false;
						}
						else if (p % 2 == 0 && g[p][i] == p + 1) {
							if (c[p] == c[g[p][i]])ok = false;
						}
						else {
							if (c[p] != c[g[p][i]])ok = false;
						}
					}
					else {
						if (p & 1 && g[p][i] == p - 1) {
							c[g[p][i]] = 1 - c[p];
						}
						else if (p % 2 == 0 && g[p][i] == p + 1) {
							c[g[p][i]] = 1 - c[p];
						}
						else {
							c[g[p][i]] = c[p];
						}
						q.push(g[p][i]);
					}
				}
			}

		}
		if (ok)cout << "Yes" << endl;
		else cout << "No" << endl;
	}

}


Measured memory_bytes: 5740