fun main(args: Array<String>) {
  val N = readLine()!!.toInt()
  val words = (1..N).map{readLine()!!.toString()}.toList()
  if(judgeDuplicate(words)){
    println("No")
    return
  }

  if(judgeShiritori(words, N)){
    println("Yes")
    return
  }
    println("No")

}

fun judgeDuplicate(words: List<String>): Boolean{
  return words.any{word ->
    words.filter{it == word}.size >= 2
  }
}

fun judgeShiritori(words: List<String>, N: Int): Boolean{
  return (0 .. N - 2).all{index ->
      words[index].takeLast(1) == words[index + 1].take(1)
    }
}