#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (cin >> n, n) {
    vector<string> strings(n);
    int maxlen = 0;
    for (int i = 0; i < (int)(n); ++i) {
      cin >> strings[i];
      maxlen = max(maxlen, (int)strings[i].length());
    }
    map<char, char> replaced;
    char c = 'a';
    for (int x = 0; x < (int)(maxlen); ++x) {
      for (int y = 0; y < (int)(n); ++y) {
        if (x < strings[y].length()) {
          if (!((replaced).find(strings[y][x]) != (replaced).end())) {
            replaced[strings[y][x]] = c++;
          }
          strings[y][x] = replaced[strings[y][x]];
        }
      }
    }
    vector<string> sorted = strings;
    sort((sorted).begin(), (sorted).end());
    cout << (strings == sorted ? "yes" : "no") << endl;
  }
}
