object Main extends App {
  val N = io.StdIn.readLine.toInt

  val Ws = for (i <- 1 to N) yield io.StdIn.readLine

  val out = if (Ws.sliding(2).forall(w => w(0).last == w(1).head) && Ws.toSet.size == Ws.size) "Yes" else "No"

  println(out)
}
