#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (cin >> n) {
    vector<string> s1(n);
    vector<string> s2(n);
    int ma = 0;
    for (int i = 0; i < (int)(n); ++i) {
      cin >> s1[i];
      ma = max(ma, (int)s1[i].length());
    }
    s2 = s1;
    map<char, char> m;
    map<char, char> m2;
    char c = 'A';
    for (int i = 0; i < (int)(ma); ++i) {
      for (int j = 0; j < (int)(n); ++j) {
        if ((int)s1[j].length() > i) {
          char cc = s1[j][i];
          if (((m).find(cc) != (m).end())) {
            s2[j][i] = m[cc];
          } else {
            m[cc] = s2[j][i] = c;
            m2[c] = cc;
            c++;
          }
        }
      }
    }
    sort((s2).begin(), (s2).end());
    for (int i = 0; i < (int)(n); ++i) {
      for (int j = 0; j < (int)(s2[i].length()); ++j) {
        s2[i][j] = m2[s2[i][j]];
      }
    }
    for (int i = 0; i < (int)(n); ++i) {
      if (s1[i] != s2[i]) {
        cout << "no" << endl;
        goto NEXT;
      }
    }
    cout << "yes" << endl;
  NEXT : {}
  }
}
