#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
 
using namespace std;

/* constant */

const int MAX_N = 20000;

const int dxs[] = {1, 0, -1, 0};
const int dys[] = {0, 1, 0, -1};

/* typedef */

typedef pair<int,int> pii;
typedef map<pii,int> mpii;

struct Futon {
  int x0, y0, x1, y1;
  Futon() {}

  void init(int x, int y, char dir) {
    x0 = x, y0 = y;
    if (dir == 'x') x1 = x + 1, y1 = y;
    else x1 = x, y1 = y + 1;
  }

  bool _adjcell(int ax, int ay, int bx, int by) const {
    return
      (ax == bx && (ay == by - 1 || ay == by + 1)) ||
      (ay == by && (ax == bx - 1 || ax == bx + 1));
  }
  
  bool adj(const Futon& f0) const {
    return
      _adjcell(x0, y0, f0.x0, f0.y0) ||
      _adjcell(x0, y0, f0.x1, f0.y1) ||
      _adjcell(x1, y1, f0.x0, f0.y0) ||
      _adjcell(x1, y1, f0.x1, f0.y1);
  }

  bool operator<(const Futon& f0) const {
    return (x0 < f0.x0 || (x0 == f0.x0 && y0 < f0.y0));
  }
  
  void print() { printf("(%d,%d)-(%d,%d)\n", x0, y0, x1, y1); }
};

typedef set<Futon> sftn;

enum { CH = -1, CF = -2 };

/* global variables */

int n;
Futon ftns[MAX_N];

/* subroutines */

/* main */

int main() {
  for (;;) {
    cin >> n;
    if (n == 0) break;

    mpii cells;
    sftn sf;
    
    for (int i = 0; i < n; i++) {
      int x, y;
      char dir;
      cin >> x >> y >> dir;

      ftns[i].init(x, y, dir);
      cells[pii(ftns[i].x0, ftns[i].y0)] = i;
      cells[pii(ftns[i].x1, ftns[i].y1)] = i;
      sf.insert(ftns[i]);
    }

    bool ok = true;
    
    while (! sf.empty()) {
      Futon f = *(sf.begin());
      sf.erase(f);

      queue<Futon> q;
      q.push(f);
      cells[pii(f.x0, f.y0)] = CH;
      cells[pii(f.x1, f.y1)] = CF;

      while (! q.empty()) {
	Futon u = q.front(); q.pop();

	int c0 = cells[pii(u.x0, u.y0)];
	int c1 = cells[pii(u.x1, u.y1)];

	for (int di = 0; di < 4; di++) {
	  int cx = u.x0 + dxs[di], cy = u.y0 + dys[di];
	  if (cx != u.x1 || cy != u.y1) {
	    mpii::iterator mit = cells.find(pii(cx, cy));
	    if (mit != cells.end()) {
	      int ax = mit->first.first;
	      int ay = mit->first.second;
	      int k = mit->second;
	      if (k >= 0) {
		Futon& v = ftns[k];
		cells[pii(cx, cy)] = c0;
		if (cx == v.x0 && cy == v.y0)
		  cells[pii(v.x1, v.y1)] = c1;
		else
		  cells[pii(v.x0, v.y0)] = c1;
		sf.erase(v);
		q.push(v);
	      }
	      else if (k != c0) {
		ok = false;
		break;
	      }
	    }
	  }
	}
	if (! ok) break;
	
	for (int di = 0; di < 4; di++) {
	  int cx = u.x1 + dxs[di], cy = u.y1 + dys[di];
	  if (cx != u.x0 || cy != u.y0) {
	    mpii::iterator mit = cells.find(pii(cx, cy));
	    if (mit != cells.end()) {
	      int ax = mit->first.first;
	      int ay = mit->first.second;
	      int k = mit->second;
	      if (k >= 0) {
		Futon& v = ftns[k];
		cells[pii(cx, cy)] = c1;
		if (cx == v.x0 && cy == v.y0)
		  cells[pii(v.x1, v.y1)] = c0;
		else
		  cells[pii(v.x0, v.y0)] = c0;
		sf.erase(v);
		q.push(v);
	      }
	      else if (k != c1) {
		ok = false;
		break;
	      }
	    }
	  }
	}
	if (! ok) break;
      }
      if (! ok) break;
    }

    if (false) {
      for (mpii::iterator mit = cells.begin(); mit != cells.end(); mit++) {
	int x = mit->first.first;
	int y = mit->first.second;
	int k = mit->second;
	printf("(%d,%d)=%d\n", x, y, k);
      }
    }
    
    cout << (ok ? "Yes" : "No") << endl;
  }

  return 0;
}

Measured memory_bytes: 5228