#include <bits/stdc++.h>
using namespace std;
const int MAX = 30;
vector<pair<int, int> > E;
pair<char, char> comp(string a, string b) {
  for (int i = 0; i < (int)min(a.length(), b.length()); i++)
    if (a[i] != b[i]) return pair<char, char>(a[i], b[i]);
  if (a.length() > b.length()) return pair<char, char>(a[b.length()], '?');
  if (a.length() < b.length()) return pair<char, char>('?', b[a.length()]);
  return pair<char, char>('?', '?');
}
bool add_edge(const vector<string>& v) {
  E.clear();
  for (int i = 0; i + 1 < (int)v.size(); i++) {
    pair<char, char> p = comp(v[i], v[i + 1]);
    if (p == pair<char, char>('?', '?')) continue;
    if (p.second == '?') return false;
    if (p.first != '?')
      E.push_back(pair<char, char>(p.first - 'a', p.second - 'a'));
  }
  return true;
}
bool hasCircle(int N) {
  vector<int> d(N, 0);
  for (int i = 0; i <= N; i++) {
    bool update = false;
    for (int j = 0; j < (int)E.size(); j++)
      if (d[E[j].second] < d[E[j].first] + 1) {
        d[E[j].second] = d[E[j].first] + 1;
        update = true;
      }
    if (i == N && update) return true;
    if (!update) break;
  }
  return false;
}
bool solve(const vector<string>& v) {
  if (!add_edge(v)) return false;
  return !hasCircle(v.size());
}
int main() {
  int N;
  while (cin >> N && N) {
    vector<string> v(N);
    for (int i = 0; i < N; i++) cin >> v[i];
    cout << (solve(v) ? "yes" : "no") << endl;
  }
  return 0;
}
