while (inp = gets) && inp != '0'
  ss = []
  n = inp.to_i
  n.times{ss << gets.chomp}
  g = Array.new(26){Array.new(26,false)}
  ng = false
  n.times{|i|
    i.times{|j|
      if [ss[i].size,ss[j].size].min.times{|k|
          if ss[i][k] != ss[j][k]
            g[ss[j][k].ord-'a'.ord][ss[i][k].ord-'a'.ord] = true
            break
          end
        }
        ng = true if ss[i] != ss[j]
      end
    }
  }
  26.times{|k|
    26.times{|i|
      26.times{|j|
        g[i][j] |= g[i][k]&&g[k][j]
        ng |= i==j && g[i][j]
      }
    }
  }
  puts ng ? 'no' : 'yes'
end