#include <bits/stdc++.h>
using namespace std;
int n;
string S[512];
vector<int> G[32];
int dfs(int p, int d) {
  if (d > 26) return 0;
  for (auto g : G[p]) {
    if (!dfs(g, d + 1)) return 0;
  }
  return 1;
}
int solve() {
  for (int(i) = (0); ((i)) < ((26)); ++(i)) G[31].push_back(i);
  for (int(i) = (0); ((i)) < ((n - 1)); ++(i)) {
    int p = 0;
    string s = S[i], t = S[i + 1];
    while (1) {
      if (s[p] == '\0') break;
      if (t[p] == '\0') return 0;
      if (s[p] != t[p]) {
        G[s[p] - 'a'].push_back(t[p] - 'a');
        break;
      }
      p++;
    }
  }
  return dfs(31, 0);
}
int main() {
  while (1) {
    cin >> n;
    if (n == 0) return 0;
    for (int(i) = (0); ((i)) < ((32)); ++(i)) G[i].clear();
    for (int(i) = (0); ((i)) < ((n)); ++(i)) cin >> S[i];
    cout << (solve() ? "Yes\n" : "No\n");
  }
  return 0;
}
