#include <bits/stdc++.h>
using namespace std;
#define FOR(i,k,n) for(int i = (k); i < (n); i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(a) a.begin(), a.end()
#define MS(m,v) memset(m,v,sizeof(m))
#define D10 fixed<<setprecision(10)
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<string> vs;
typedef pair<int, int> pii;
const int MOD = 1000000007;
const int INF = MOD + 1;
const ld EPS = 1e-12;
template<class T> T &chmin(T &a, const T &b) { return a = min(a, b); }
template<class T> T &chmax(T &a, const T &b) { return a = max(a, b); }
int dx[] = { -1, 0, 0, 1 }; int dy[] = { 0, -1, 1, 0 };
//[int dx[] = { -1, -1, -1, 0, 0, 1, 1, 1 }; int dy[] = { 0, -1, 1, -1, 1, 0, -1, 1 };
bool valid(int x, int y, int h, int w) { return (x >= 0 && y >= 0 && x < h&&y < w); }
int place(int x, int y, int w) { return w*x + y; }

/*--------------------template--------------------*/

int main()
{
	int n;
	while (cin >> n, n)
	{
		map<pii, int> mp;
		vector<vector<pii>> v;
		REP(i, n)
		{
			int x, y; char c;
			cin >> x >> y >> c;
			auto l = pii(x, y);
			if (c == 'x') x++;
			else y++;
			auto r = pii(x, y);
			mp[l] = i;
			mp[r] = i;
			v.emplace_back(vector<pii>{l, r});
		}
		vector<bool> vis(n);
		map<pii, bool> con;
		bool ans = true;
		REP(i, n)
		{
			if (vis[i]) continue;
			vis[i] = true;
			queue<pii> que;
			REP(j, 2)
			{
				que.push(v[i][j]);
				con[v[i][j]] = j;
			}
			while (que.size())
			{
				int tx = que.front().first, ty = que.front().second;
				pii tmp = que.front();
				que.pop();
				REP(j, 4)
				{
					int nx = tx + dx[j], ny = ty + dy[j];
					pii t(nx, ny);
					if (mp.find(t) == mp.end()) continue;
					int futon = mp[t];
					pii oth;
					if (v[futon][0] == t) oth = v[futon][1];
					else oth = v[futon][0];
					if (oth == tmp) continue;

					if (con.find(t) == con.end())
					{
						con[t] = con[tmp];
						con[oth] = 1 - con[tmp];
						que.push(t); que.push(oth);
						vis[futon] = true;
					}
					else
					{
						if (con[t] != con[tmp]) 
							ans = false;
					}
				}
			}
		}
		puts(ans ? "Yes" : "No");
	}
	return 0;
}