fun main() {
    val n= readLine()!!.toInt()
    val words= mutableSetOf<String>()
    var f=true
    var bef: String?=null
    for (i in 0 until n){
        val word=readLine()!!
        words.add(word)
        if (bef!=null){
            if (word.first()!=bef.last()){
                f=false
            }
        }
        bef=word
    }
    if (!f || words.size!=n){
        println("No")
    }else{
        println("Yes")
    }
}