#include <bits/stdc++.h>
using namespace std;
const int MAXN = 555;
int n;
char str[MAXN][22];
int vis[26][26];
int in[26];
queue<int> q;
bool topsort() {
  while (!q.empty()) q.pop();
  for (int i = 0; i < 26; i++)
    if (in[i] == 0) q.push(i);
  int num = 0;
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    num++;
    for (int i = 0; i < 26; i++)
      if (vis[u][i] == 1) {
        in[i]--;
        if (in[i] == 0) q.push(i);
      }
  }
  return num == 26;
}
bool check() {
  memset(vis, 0, sizeof vis);
  memset(in, 0, sizeof in);
  for (int i = 2; i <= n; i++) {
    for (int j = 0; str[i][j] || str[i - 1][j]; j++) {
      if (str[i][j] == str[i - 1][j]) continue;
      if (!str[i][j]) return false;
      char x = str[i - 1][j] - 'a', y = str[i][j] - 'a';
      if (vis[y][x]) return false;
      if (!vis[x][y]) {
        vis[x][y] = 1;
        in[y]++;
      }
      break;
    }
  }
  return topsort();
}
int main() {
  while (scanf("%d", &n) == 1 && n) {
    memset(str, 0, sizeof str);
    for (int i = 1; i <= n; i++) scanf("%s", str[i]);
    if (check())
      puts("yes");
    else
      puts("no");
  }
  return 0;
}
