fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    val w = Array(n) { readLine()!! }
    val s = mutableSetOf(w[0])
    var c = w[0].last()
    for (i in 1 until n) {
        val cw = w[i]
        if (cw.first() != c || cw in s) {
            println("No")
            return
        }
        c = cw.last()
        s += cw
    }
    println("Yes")
}
