object Main extends App {
  def checkWord(N: Int, words: List[String]): Unit = {
    if (N <= 0) println("Yes")
    else {
      val word = io.StdIn.readLine()
      if (words.isEmpty) checkWord(N - 1, word :: words)
      else if (words.contains(word)) {
        println("No")
      }
      else if (words.head.apply(words.head.length - 1) != word.head) {
        println("No")
      }
      else {
        checkWord(N - 1, word :: words)
      }
    }
  }

  val N = io.StdIn.readInt()
  val words = List[String]()
  checkWord(N, words)
}
