#include <bits/stdc++.h>
using namespace std;
constexpr int INF = 1e9;
constexpr int MOD = 1e9 + 7;
constexpr double EPS = 1e-9;
template <typename T1, typename T2>
ostream& operator<<(ostream& os, const pair<T1, T2>& p) {
  return os << '(' << p.first << ',' << p.second << ')';
}
template <typename Ostream, typename Container>
Ostream& operator<<(Ostream& os, const Container& c) {
  os << '[';
  for (auto i = begin(c); i != end(c); ++i)
    os << (i == begin(c) ? "" : " ") << *i;
  return os << ']';
}
bool solve(vector<string> ss) {
  ss.erase(unique(begin(ss), end(ss)), end(ss));
  int n = ss.size();
  vector<vector<int> > d(26, vector<int>(26, 99));
  for (int i = int(0); i < int(26); i++) d[i][i] = 0;
  for (int i = int(0); i < int(n - 1); i++) {
    const string &s1 = ss[i], &s2 = ss[i + 1];
    for (int j = 0;; j++) {
      if (j == s2.size()) return false;
      if (j == s1.size()) break;
      if (s1[j] != s2[j]) {
        int u = s1[j] - 'a', v = s2[j] - 'a';
        if (d[u][v] == 1) return false;
        d[u][v] = -1, d[v][u] = 1;
        break;
      }
    }
  }
  for (int k = int(0); k < int(26); k++)
    for (int i = int(0); i < int(26); i++)
      for (int j = int(0); j < int(26); j++)
        d[i][j] = min(d[i][j], d[i][k] + d[k][j]);
  for (int i = int(0); i < int(26); i++)
    if (d[i][i] < 0) return false;
  return true;
}
int main() {
  for (int n; cin >> n && n;) {
    vector<string> ss(n);
    for (int i = int(0); i < int(n); i++) cin >> ss[i];
    cout << (solve(ss) ? "yes" : "no") << endl;
  }
}
