#include <bits/stdc++.h>
using namespace std;
const int MAX_V = 100;
vector<int> g[MAX_V];
vector<int> tp;
bool visit(int v, vector<int> &color) {
  color[v] = 1;
  for (int i = 0; i < (g[v].size()); i++) {
    int d = g[v][i];
    if (color[d] == 2) continue;
    if (color[d] == 1) return false;
    if (not visit(d, color)) return false;
  }
  tp.emplace_back(v);
  color[v] = 2;
  return true;
}
bool topologicalSort(int v) {
  vector<int> color(v);
  for (int i = 0; i < (v); i++) {
    if (not color[i] && not visit(i, color)) return false;
  }
  reverse((tp).begin(), (tp).end());
  return true;
}
int main() {
  int n;
  while (cin >> n, n) {
    for (int i = 0; i < (MAX_V); i++) g[i].clear();
    tp.clear();
    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];
    bool ans = true;
    for (int i = 0; i < (n); i++) {
      for (int j = (i + 1); j < (n); j++) {
        for (int k = 0; k < (10); k++) {
          if (s[i][k] != '\0' && s[j][k] == '\0') {
            ans = false;
            break;
          } else if (s[i][k] == '\0' || s[j][k] == '\0') {
            break;
          } else if (s[i][k] != s[j][k]) {
            g[s[i][k] - 'a'].emplace_back(s[j][k] - 'a');
            break;
          }
        }
      }
    }
    cout << (topologicalSort(27) && ans ? "Yes" : "No") << endl;
  }
}
