fun main(args: Array<String>) {
    val N = readLine()!!.toInt()
    val words = Array(N) { readLine()!! }
    for (i in 1 until N) {
        val w = words[i]
        if (w[0] != words[i-1][words[i-1].length-1]) {
            println("No")
            return
        }
        for (j in 0 until i) {
            if (w == words[j]) {
                println("No")
                return
            }
        }
    }
    println("Yes")
}