"use strict"

function main(input) {
  input = input.split(/\n|\s/)

  const words = input.slice(1, -1)

  let ans = "Yes"
  let prevword = words[0]
  let sets = new Set()
  sets.add(words[0])
  console.log(sets)
  for (let i = 1; i < words.length; i++) {
    if (words[i][0] != prevword[prevword.length - 1] || sets.has(words[i])) {
      ans = "No"
      break
    }
    prevword = words[i]
    sets.add(words[i])
  }

  console.log(ans)
}
main(require("fs").readFileSync("/dev/stdin", "utf8"))
