#include "iostream"
#include "climits"
#include "list"
#include "queue"
#include "stack"
#include "set"
#include "functional"
#include "algorithm"
#include "string"
#include "map"
#include "unordered_map"
#include "unordered_set"
#include "iomanip"
#include "cmath"
#include "random"
#include "bitset"
#include "cstdio"
#include "numeric"
#include "cassert"
#include "ctime"

using namespace std;

constexpr long long int MOD = 1000000007;
//constexpr int MOD = 1000000007;
//constexpr int MOD = 998244353;
//constexpr long long int MOD = 998244353;
constexpr double EPS = 1e-12;

//int N, M, K, T, H, W, L, R;
long long int N, M, K, T, H, W, L, R;

struct Huton {
	int x, y;
	char c;
	Huton() {

	}
	Huton(const int a, const int b, const  char cc) {
		y = a, x = b, c = cc;
	}
	bool operator<(const Huton&h)const {
		return make_pair(make_pair(y, x), c - 'a') < make_pair(make_pair(h.y, h.x), c - 'a');
	}
};

void push(vector<vector<int>>&edge, int a, int b) {
	edge[a].push_back(b);
	edge[b].push_back(a);
}

void in(map<Huton, int>&mp, vector<vector<int>>&edge, pair<Huton, int>h, int y, int x, char c, int aadd, int badd) {
	auto it = mp.find(Huton(y, x, c));
	if (it != mp.end()&&c==it->first.c) {
		push(edge, h.second * 2 + aadd, it->second * 2 + badd);
		if (h.first.c == c && aadd == badd) {
			push(edge, h.second * 2 + aadd + 1, it->second * 2 + badd + 1);
		}
	}
}

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);

	while (cin >> N, N) {
		vector<vector<int>>same(N * 2);
		vector<vector<int>>tigau(N * 2);
		map<Huton, int>mp;
		for (int i = 0; i < N; i++) {
			Huton h;
			cin >> h.x >> h.y >> h.c;
			mp[h] = i;
		}
		for (int i = 0; i < N * 2; i += 2) {
			tigau[i].push_back(i + 1);
			tigau[i + 1].push_back(i);
		}
		for (auto i : mp) {
			if (i.first.c == 'x') {
				in(mp, same, i, i.first.y + 0, i.first.x + 2, 'y', 1, 0);
				in(mp, same, i, i.first.y + 1, i.first.x + 0, 'y', 0, 0);
				in(mp, same, i, i.first.y + 1, i.first.x + 1, 'y', 1, 0);
				in(mp, same, i, i.first.y + 0, i.first.x + 2, 'x', 1, 0);
				in(mp, same, i, i.first.y + 1, i.first.x - 1, 'x', 0, 1);
				in(mp, same, i, i.first.y + 1, i.first.x - 0, 'x', 0, 0);
				in(mp, same, i, i.first.y + 1, i.first.x + 1, 'x', 1, 0);
			}
			else {
				in(mp, same, i, i.first.y + 0, i.first.x + 1, 'y', 0, 0);
				in(mp, same, i, i.first.y + 1, i.first.x - 1, 'y', 1, 0);
				in(mp, same, i, i.first.y + 1, i.first.x + 1, 'y', 1, 0);
				in(mp, same, i, i.first.y + 2, i.first.x + 0, 'y', 1, 0);
				in(mp, same, i, i.first.y + 0, i.first.x + 1, 'x', 0, 0);
				in(mp, same, i, i.first.y + 1, i.first.x + 1, 'x', 1, 0);
				in(mp, same, i, i.first.y + 1, i.first.x - 2, 'x', 1, 1);
				in(mp, same, i, i.first.y + 2, i.first.x - 1, 'x', 1, 1);
				in(mp, same, i, i.first.y + 2, i.first.x - 0, 'x', 1, 0);
			}
		}
		bool flag = true;
		vector<int>node(N * 2, -1);
		queue<int>Q;
		for (int i = 0; i < N * 2; i++) {
			if (node[i] >= 0)continue;
			node[i] = 0;
			queue<int>Q;
			Q.push(i);
			while (!Q.empty()) {
				int cn = Q.front();
				Q.pop();
				for (auto j : same[cn]) {
					if (node[j] == -1) {
						node[j] = node[cn];
						Q.push(j);
					}
					if (node[j] != node[cn])flag = false;
				}
				for (auto j : tigau[cn]) {
					if (node[j] == -1) {
						node[j] = 1 - node[cn];
						Q.push(j);
					}
					if (node[j] + node[cn] != 1)flag = false;
				}
			}
		}
		if (flag)cout << "Yes\n";
		else cout << "No\n";
	}
}


Measured memory_bytes: 8508