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