fun main(args:Array<String>) {
	val n = readLine()!!.toInt()
	val s=(1..n).map{ readLine()!! }
	
	if(s.map{ it.last() }.dropLast(1)==s.map{ it.first() }.drop(1)
		&& s.distinct().size == n ){
		println("Yes")
	}else{
		println("No")
	}
}