object Main extends App {
	val n = scala.io.StdIn.readInt
	val a = new Array[String](n)

	for(i<-0 until n){
		a(i) = scala.io.StdIn.readLine.toString
	}

	if(a.toSet.size != n){
		println("No")
	}else{
		var tp = a(0).toList.reverse.head
		var fg = true
		for(i<-1 until n){
			val tq = a(i).toList.head
			if(tp == tq){
				tp = a(i).toList.reverse.head
			}else{
				fg = false
			}
		}

		if(fg){
			println("Yes")
		}else{
			println("No")
		}
	}

}
