// B - Shiritori
// https://abc109.contest.atcoder.jp/tasks/abc109_b

import scala.io.StdIn.readLine

object Main extends App {

  val n = readLine.toInt
  val ws: List[String] = (0 until n).toList.map(_ => readLine)

  val isOk = (
    ws.length == ws.distinct.length &&
    ws.sliding(2).forall(wss => (wss(0).last == wss(1).head))
  )

  isOk match {
    case true  => println("Yes")
    case false => println("No")
  }

}