fun main(arr: Array<String>) {
    if(getAns()) {
        println("Yes")
    } else {
        println("No")
    }
}

fun getAns():Boolean {
    val count = readLine()!!.toInt()
    val log = (1..count).map { readLine()!! }
    val memo = mutableSetOf(log.first())
    for(i in (1 until count)) {
        if(log[i-1].last() != log[i].first()) {
            return false
        }
        if(memo.contains(log[i])) {
            return false
        }
        memo.add(log[i])
    }
    return true
}
