
object Main extends App {
  
  val sc = new java.util.Scanner(System.in)
  val n = sc.nextInt()
  val w = Array.fill(n)(sc.next())
  
  if (!isDup(w) && isChain(w)) print("Yes") else print("No")
  
  def isDup(words: Array[String]): Boolean = {
    val map  = words.groupMapReduce(identity)(_ => 1)(_ + _)
    map.exists{case (k, v) => v > 1}
  }
  
  def isChain(words: Array[String]): Boolean = {
    words.zip(words.tail).forall(x => x._1.last == x._2.head)
  }
}