#include <bits/stdc++.h>
using namespace std;
string s[501];
int d[26][26], n;
int main() {
  while (cin >> n, n) {
    int ans = 0, f = 0;
    memset(d, 0, sizeof(d));
    for (int i = 0; i < n; i++) cin >> s[i];
    for (int i = 0; i < n - 1; i++) {
      for (int j = 0; j < s[i].size(); j++) {
        if (j >= s[i + 1].size()) {
          f++;
          break;
        }
        if (s[i][j] != s[i + 1][j]) {
          d[s[i][j] - 'a'][s[i + 1][j] - 'a'] = -1;
          break;
        }
      }
    }
    for (int k = 0; k < 26; k++)
      for (int i = 0; i < 26; i++)
        for (int j = 0; j < 26; j++) d[i][j] = min(d[i][j], d[i][k] + d[k][j]);
    for (int i = 0; i < 26; i++)
      if (d[i][i] < 0) ans++;
    cout << (ans || f ? "no" : "yes") << endl;
  }
}
