import scala.io.StdIn._
val n = readLine().toInt
var w_ar: Array[String] = Array.empty
for (_ <- 1 to n){
  w_ar = w_ar :+ readLine()
}

def hoge(ar: Array[String], nn: Int):String = {
  for (i<-0 to nn-2){
    if (ar(i).last != ar(i+1).head) {
      "No"
    }
  }
  "Yes"
}

if (w_ar.length != w_ar.distinct.length) {
  println("No")
} else {
  println(hoge(w_ar, n))
}