#include <bits/stdc++.h>
using namespace std;
vector<int> G[26];
bool g[26];
bool dfs(int now, int pre) {
  if (g[now] == true) return false;
  bool res = true;
  g[now] = true;
  set<int> st;
  for (int i = 0; i < G[now].size(); i++) {
    int next = G[now][i];
    if (st.count(next)) continue;
    st.insert(next);
    res &= dfs(next, now);
  }
  return res;
}
int main() {
  int n;
  while (1) {
    for (int i = 0; i < 26; i++) G[i].clear();
    cin >> n;
    if (n == 0) break;
    vector<string> s(n);
    for (int i = 0; i < n; i++) {
      cin >> s[i];
    }
    bool f = true;
    for (int i = 0; i < n - 1; i++) {
      for (int j = 0; j < s[i].size(); j++) {
        if (s[i + 1].size() == j) {
          f = false;
          break;
        }
        if (s[i][j] != s[i + 1][j]) {
          G[s[i][j] - 'a'].push_back(s[i + 1][j] - 'a');
          break;
        }
      }
    }
    for (int j = 0; j < 26; j++) {
      for (int i = 0; i < 26; i++) g[i] = false;
      f &= dfs(j, -1);
    }
    if (f)
      cout << "yes" << endl;
    else
      cout << "no" << endl;
  }
}
