object Main extends App{
  val sc = new java.util.Scanner(System.in)
  val N= sc.nextInt
  val W = List.fill(N)(sc.next)
  val joken1 = W.size == W.distinct.size
  val joken2 = (0 to N-2).map(i=>W(i).last == W(i+1).head).reduce(_&_)
  val ans = if(joken1 & joken2){"Yes"}else{"No"}
  println(ans)
}

