fun main(args: Array<String>) {
    abc109b()
}

fun abc109b() {
    val n = readLine()!!.toInt()
    val words = (1..n).map { readLine()!! }

    val duplicated = words.groupBy { it }.let { it.maxBy { it.value.size }!!.let { it.value.size > 1 } }

    val isShiritori = (0 until n - 1).all {
        words[it].last() == words[it + 1].first()
    }

    val answer = if (!duplicated && isShiritori) "Yes" else "No"

    println(answer)
}