import scala.io.StdIn

object Main extends App {
  val n = StdIn.readLine().toInt
  val words = (0 until n).map(_ => StdIn.readLine())
  val r = words.sliding(2).foldLeft((Map.empty[String, Int], true)) { (acc, lst) =>
    if (acc._2 &&
      lst(0).last == lst(1).head &&
      !acc._1.contains(lst(0)) &&
      !acc._1.contains(lst(1))) {
      (acc._1 + (lst(0) -> 1), true)
    } else {
      (Map.empty[String, Int], false)
    }
  }
  println(if (r._2) "Yes" else "No")

}
