#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <map>

using namespace std;

using lint = long long;
using ldouble = long double;

map<pair<int, int>, int> pat;
map<pair<int, int>, pair<int, int>> opp;

const int dx[4] = {0, -1, 1, 0}, dy[4] = {-1, 0, 0, 1};

bool paint(pair<int, int> p, int c) {
    // cerr << p.first << "," << p.second << " " << c << endl;

    if (!opp.count(p)) return true;
    if (pat.count(p)) return pat[p] == c;

    pat[p] = c;

    for (int i = 0; i < 4; ++i) {
        auto q = make_pair(p.first + dx[i], p.second + dy[i]);
        if (!paint(q, (q == opp[p] ? 1 - c : c))) {
            pat.erase(p);
            return false;
        }
    }
    return true;
}

bool solve() {
    pat.clear();
    opp.clear();

    int N;
    cin >> N;
    if (N == 0) return false;

    vector<pair<int, int>> T(N);
    for (auto& t : T) {
        char dir;
        cin >> t.first >> t.second >> dir;
        auto s = t;
        ++(dir == 'x' ? s.first : s.second);
        opp[t] = s;
        opp[s] = t;
    }

    for (int i = 0; i < N; ++i) {
        if (pat.count(T[i])) continue;
        if (!paint(T[i], 0) && !paint(T[i], 1)) {
            cout << "No" << endl;
            return true;
        }
    }

    cout << "Yes" << endl;
    return true;
}

int main() {
    while (solve()) {}
    return 0;
}

