#include <bits/stdc++.h>
using namespace std;
vector<int> G[30];
vector<string> arr;
vector<pair<int, int> > edges;
bool found[30];
bool used[30];
bool cycle;
bool inValid(string a, string b) {
  if (a == b) return false;
  int diff = -1;
  for (int i = 0; i < min(a.size(), b.size()); i++)
    if (a[i] != b[i]) {
      diff = i;
      break;
    }
  if (diff == -1 && a.size() > b.size()) return true;
  return false;
}
void add(string a, string b) {
  if (a == b) return;
  int diff = -1;
  for (int i = 0; i < min(a.size(), b.size()); i++)
    if (a[i] != b[i]) {
      diff = i;
      break;
    }
  if (diff == -1) return;
  edges.push_back(pair<int, int>(a[diff] - 'a', b[diff] - 'a'));
}
bool visit(int v, vector<int>& order, vector<int>& color) {
  color[v] = 1;
  for (int i = 0; i < G[v].size(); i++) {
    int e = G[v][i];
    if (color[e] == 2) continue;
    if (color[e] == 1) return false;
    if (!visit(e, order, color)) return false;
  }
  order.push_back(v);
  color[v] = 2;
  return true;
}
bool topologicalSort(vector<int>& order) {
  vector<int> color(26, 0);
  for (int u = 0; u < 26; u++)
    if (!color[u] && !visit(u, order, color)) return false;
  reverse(order.begin(), order.end());
  return true;
}
int main() {
  int n;
  while (cin >> n, n) {
    for (int i = 0; i < n; i++) {
      G[i].clear();
      found[i] = used[i] = false;
    }
    bool fin = false;
    cycle = false;
    arr.clear();
    arr.resize(n);
    edges.clear();
    for (int i = 0; i < n; i++) cin >> arr[i];
    for (int i = 0; i < n - 1; i++) {
      if (inValid(arr[i], arr[i + 1])) {
        puts("no");
        fin = true;
        break;
      }
      add(arr[i], arr[i + 1]);
    }
    if (fin) continue;
    for (int i = 0; i < edges.size(); i++) {
      int src = edges[i].first;
      int dst = edges[i].second;
      G[src].push_back(dst);
    }
    vector<int> order;
    if (!topologicalSort(order)) {
      puts("no");
      continue;
    }
    puts("yes");
  }
  return 0;
}
