#include <bits/stdc++.h>
using namespace std;
int n;
vector<int> s[500];
vector<int> e[30];
bool saw[500];
bool f(int p) {
  if (saw[p]) return false;
  saw[p] = true;
  bool ret = true;
  for (int i = 0; i < e[p].size(); i++) {
    if (!f(e[p][i])) return false;
  }
  return ret;
}
void solve() {
  for (int i = 0; i < 500; i++) saw[i] = false;
  for (int i = 0; i < 500; i++) s[i].clear();
  for (int i = 0; i < 30; i++) e[i].clear();
  for (int i = 0; i < n; i++) {
    string str;
    cin >> str;
    for (int j = 0; j < str.size(); j++) {
      int x = str[j] - 'a';
      s[i].push_back(x);
    }
  }
  for (int i = 0; i < n - 1; i++) {
    int t = min(s[i].size(), s[i + 1].size());
    bool ok = false;
    for (int j = 0; j < t; j++) {
      if (s[i][j] != s[i + 1][j]) {
        e[s[i][j]].push_back(s[i + 1][j]);
        ok = true;
        break;
      }
    }
    if (!ok) {
      if (s[i].size() > s[i + 1].size()) {
        puts("no");
        return;
      }
    }
  }
  for (int i = 0; i < 30; i++) sort(e[i].begin(), e[i].end());
  for (int i = 0; i < 30; i++)
    e[i].erase(unique(e[i].begin(), e[i].end()), e[i].end());
  for (int i = 0; i < 30; i++) {
    for (int j = 0; j < 500; j++) saw[j] = false;
    if (!f(i)) {
      puts("no");
      return;
    }
  }
  puts("yes");
}
int main() {
  while (true) {
    cin >> n;
    if (n == 0) break;
    solve();
  }
}
