#include <bits/stdc++.h>
using namespace std;
vector<int> edge[150];
bool come[150];
int dfs(int x) {
  if (come[x]) return -1;
  come[x] = true;
  for (int i = 0; i < edge[x].size(); i++) {
    if (dfs(edge[x][i]) == -1) return -1;
  }
  come[x] = false;
  return 0;
}
bool ok() {
  for (int i = 'a'; i <= 'z'; i++) {
    if (dfs(i) == -1) return false;
  }
  return true;
}
int main() {
  int n;
  string str, last;
  while (cin >> n, n) {
    bool fail = false;
    for (int i = 'a'; i <= 'z'; i++) edge[i].clear();
    for (int i = 0; i < n; i++) {
      cin >> str;
      if (i) {
        for (int i = 0; i < last.size(); i++) {
          if (i == str.size()) {
            cout << "no" << endl;
            fail = true;
            break;
          }
          if (str[i] != last[i]) {
            edge[last[i]].push_back(str[i]);
            break;
          }
        }
      }
      last = str;
    }
    cout << ((fail && ok()) ? "yes" : "no") << endl;
  }
}
