#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (cin >> n, n) {
    string s[505];
    for (int i = 0; i < (n); i++) cin >> s[i];
    map<pair<char, char>, int> m;
    bool ans = true;
    for (int i = 0; i < (n - 1); i++) {
      bool f = false;
      int len = min<int>(s[i].size(), s[i + 1].size());
      for (int j = 0; j < (len); j++) {
        if (s[i][j] != s[i + 1][j]) {
          m[make_pair(s[i][j], s[i + 1][j])] = 1;
          f = true;
          break;
        }
      }
      if (s[i].size() != s[i + 1].size()) ans = f;
    }
    for (char i = 'a'; i <= 'z'; i++) {
      for (char j = 'a'; j <= 'z'; j++) {
        if (i == j) continue;
        if (m[make_pair(i, j)] && m[make_pair(j, i)]) ans = false;
      }
    }
    cout << (ans ? "Yes" : "No") << endl;
  }
}
