#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;

int n;
string s[510];
vector<int> G[26];
int indeg[26];

int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(10);
  
  while (cin >> n, n) {
    for (int i = 0; i < 26; i++) {
      G[i].clear();
      indeg[i] = 0;
    }
    for (int i = 0; i < n; i++) {
      cin >> s[i];
    }
    bool no = false;
    for (int i = 0; i + 1 < n; i++) {
      if (s[i] == s[i + 1]) continue;
      int w = 0, lim = min(s[i].size(), s[i + 1].size());
      while (w < lim && s[i][w] == s[i + 1][w]) {
        w++;
      }
      no |= s[i].substr(0, s[i + 1].size()) == s[i + 1];
      if (w < lim) G[s[i][w] - 'a'].emplace_back(s[i + 1][w] - 'a');
    }
    for (int i = 0; i < 26; i++) {
      auto &v = G[i];
      sort(v.begin(), v.end());
      v.erase(unique(v.begin(), v.end()), v.end());
      for (int next : G[i]) {
        if (next != i) indeg[next]++;
      }
    }
    stack<int> st;
    int num = 0;
    for (int i = 0; i < 26; i++) {
      if (!indeg[i]) st.emplace(i);
    }
    while (!st.empty()) {
      int curr = st.top();
      st.pop();
      num++;
      for (int next : G[curr]) {
        if (--indeg[next]) continue;
        st.emplace(next);
      }
    }
    cout << (!no && num == 26 ? "yes" : "no") << endl;
  }

  return 0;
}
