#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (cin >> n, n) {
    char s[505][10];
    for (int i = 0; i < (505); i++)
      for (int j = 0; j < (10); j++) s[i][j] = '\0';
    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++) {
      for (int j = 0; j < (10); j++) {
        if (s[i][j] != '\0' && s[i + 1][j] == '\0') {
          ans = false;
          break;
        } else if (s[i][j] == '\0' || s[i + 1][j] == '\0') {
          break;
        } else if (s[i][j] != s[i + 1][j]) {
          m[make_pair(s[i][j], s[i + 1][j])] = 1;
          break;
        }
      }
    }
    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;
  }
}
