#include <bits/stdc++.h>
using namespace std;
int n, used[1 << 7], ans;
string str[501];
vector<int> mp[1 << 7];
void mk_mp(int pos, int i, int j) {
  int ni = -1, ch = str[i][pos];
  while (i != j) {
    int a = str[++i][pos];
    if (ch == a && ni == -1) ni = i - 1;
    if (ch == a && ni == -2) ans = 0;
    if (ch == a && str[i - 1].size() > str[i].size()) ans = 0;
    if (ch != a && ni >= 0) mk_mp(pos + 1, ni, i - 1), ni = -2;
    if (ch != a) mk_mp(pos, i, j), mp[ch].push_back(a);
  }
}
bool check(int pos) {
  if (used[pos]) return 0;
  used[pos] = 1;
  int res = 1, s = mp[pos].size();
  for (int i = 0; i < s; i++)
    if (i == s - 1 || mp[pos][i] != mp[pos][i + 1]) res *= check(mp[pos][i]);
  used[pos] = 0;
  return res;
}
int main() {
  while (1) {
    cin >> n;
    if (!n) break;
    for (int i = 'a'; i <= 'z'; i++) mp[i].clear();
    for (int i = 0; i < n; i++) cin >> str[i];
    ans = 1;
    mk_mp(0, 0, n - 1);
    memset(used, 0, sizeof(used));
    for (int i = 'a'; i <= 'z'; i++) ans *= check(i);
    cout << (ans ? "yes" : "no") << endl;
  }
  return 0;
}
