#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-12;
const int INF = numeric_limits<int>::max() / 2;
const int MOD = 1e9 + 7;
using graph = vector<vector<int>>;
void dfs(int v, const graph& G, vector<int>& res, vector<int>& used) {
  used[v] = 1;
  for (auto to : G[v])
    if (used[to] == 0) {
      dfs(to, G, res, used);
    }
  res.push_back(v);
}
vector<int> topo_sort(const graph& G) {
  int V = G.size();
  vector<int> ide(V);
  for (int i = 0; i < V; i++) {
    for (auto to : G[i]) {
      ide[to]++;
    }
  }
  vector<int> res;
  vector<int> used(V);
  for (int i = V - 1; i >= 0; i--) {
    if (ide[i] == 0) {
      dfs(i, G, res, used);
    }
  }
  if (res.size() == 0) res = {-1};
  reverse(res.begin(), res.end());
  return res;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  while (cin >> n, n) {
    if (n == 1) {
      cout << "yes" << endl;
      continue;
    }
    vector<string> s(n);
    for (int i = 0; i < n; i++) cin >> s[i];
    graph g(26);
    for (int i = 1; i < n; i++) {
      int len = min(s[i - 1].length(), s[i].length());
      for (int j = 0; j < len; j++) {
        if (s[i - 1][j] == s[i][j]) continue;
        int st = s[i - 1][j] - 'a', gt = s[i][j] - 'a';
        g[st].push_back(gt);
        break;
      }
    }
    vector<int> res = topo_sort(g);
    if (res.size() != 26) {
      cout << "no" << endl;
      continue;
    }
    for (int i = 0; i < n; i++) {
      int len = s[i].length();
      for (int j = 0; j < len; j++) {
        int idx = s[i][j] - 'a';
        idx = res[idx];
        s[i][j] = 'a' + idx;
      }
    }
    bool f = true;
    for (int i = 1; i < n; i++) {
      if (s[i - 1] > s[i]) f = false;
    }
    if (f)
      cout << "yes" << endl;
    else
      cout << "no" << endl;
  }
}
