#include <bits/stdc++.h>
using namespace std;
int n;
int order[128][128];
vector<string> t;
bool check(int x, int from, int to) {
  for (int i = from; i <= to; i++) {
    if (t[i].size() <= x) continue;
    for (int j = i + 1; j <= to; j++) {
      if (t[j].size() <= x) return false;
      char a = t[i][x];
      char b = t[j][x];
      if (order[a][b] != -1 && order[a][b] == 1) {
        return false;
      }
      order[a][b] = -1;
      order[b][a] = +1;
    }
  }
  int i = from;
  while (i <= to && t[i].size() <= x) i++;
  for (; i <= to; i++) {
    int j = i;
    for (; j <= to && t[i][x] == t[j][x]; j++)
      ;
    if (!check(x + 1, i, j - 1)) return false;
    i = j - 1;
  }
  return true;
}
int main() {
  while (cin >> n, n) {
    t.clear();
    for (int i = 0; i < n; i++) {
      string s;
      cin >> s;
      t.push_back(s);
    }
    memset(order, -1, sizeof(order));
    cout << (check(0, 0, n - 1) ? "yes" : "no") << endl;
  }
}
