import scala.io.StdIn._

object Main extends App {
  val n = readInt()
  val w = (1 to n).map(_ => readLine())
  if (w.toSet.toSeq.length == n && w.tail.zipWithIndex.forall { case (s, i) => s.startsWith(w(i).last.toString) })
    println("Yes")
  else
    println("No")
}
