#include <bits/stdc++.h>
using namespace std;
string s[500];
int n;
int m;
map<char, vector<pair<int, int> > > li;
bool f;
void check(vector<char> x) {
  int i, j, k = 0;
  for (map<char, vector<pair<int, int> > >::iterator it = li.begin();
       it != li.end(); ++it) {
    for (j = 0; j < (it->second).size(); j++) {
      s[(it->second)[j].first][(it->second)[j].second] = x[k];
    }
    k++;
  }
  f = true;
  for (i = 0; i < n - 1; i++) {
    if (s[i] > s[i + 1]) {
      f = false;
      break;
    }
  }
}
int main() {
  while (cin >> n, n) {
    int i, j, k, c;
    li.clear();
    for (i = 0; i < n; i++) {
      s[i] = "";
      cin >> s[i];
      for (j = 0; j < s[i].size(); j++) {
        li[s[i][j]].push_back(pair<int, int>(i, j));
      }
    }
    m = li.size();
    f = false;
    vector<char> v;
    for (i = 0; i < m; i++) v.push_back(i + '0');
    do {
      check(v);
      if (f) break;
    } while (next_permutation(v.begin(), v.end()));
    if (f)
      cout << "yes" << endl;
    else
      cout << "no" << endl;
  }
  return 0;
}
