#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e12;
const long long MOD = 1e9 + 7;
long long sq(long long num) { return num * num; }
long long mod_pow(long long x, long long n) {
  if (n == 0) return 1;
  if (n == 1) return x % MOD;
  long long res = sq(mod_pow(x, n / 2));
  res %= MOD;
  if (n % 2 == 1) {
    res *= x;
    res %= MOD;
  }
  return res;
}
long long mod_add(long long a, long long b) { return (a + b) % MOD; }
long long mod_sub(long long a, long long b) { return (a - b + MOD) % MOD; }
long long mod_mul(long long a, long long b) { return a * b % MOD; }
long long n;
map<char, char> nxt;
int main() {
  while (cin >> n && n) {
    nxt.clear();
    vector<bool> f(n, 0);
    vector<string> vs;
    for (int i = 0; i < (n); i++) {
      string s;
      cin >> s;
      for (int j = 0; j < (s.size()); j++) nxt[s[j]] = -1;
      while (s.size() < 10) s += "@";
      vs.push_back(s);
    }
    for (int i = 0; i < (10); i++) {
      for (int j = 0; j < (n - 1); j++) {
        if (vs[j][i] == '@' || vs[j + 1][i] == '@') f[j] = 1;
        if (!f[j]) {
          if (vs[j][i] != vs[j + 1][i]) {
            nxt[vs[j][i]] = vs[j + 1][i];
            f[j] = 1;
          }
        }
      }
    }
    bool ok = false;
    for (auto it = nxt.begin(); it != nxt.end(); it++) {
      set<char> sc;
      long long cnt = 0;
      char c = it->first;
      sc.insert(c);
      while (c != -1) {
        c = nxt[c];
        if (sc.find(c) != sc.end()) break;
        sc.insert(c);
        cnt++;
      }
      if (cnt == nxt.size()) ok = true;
    }
    if (ok)
      cout << "yes" << endl;
    else
      cout << "no" << endl;
  }
}
