fun main(args: Array<String>) = println(run {
    val n = readLine()!!.toInt()
    val w = (1..n).map { readLine()!! }

    val words = mutableSetOf<String>()
    words.add(w.first())
    w.reduce {a, b ->
        if(b in words || a.last() != b.first()) return@run "No"
        words.add(b)
        b
    }
    "Yes"

})
