fun main(args: Array<String>) {

    val count = readLine()!!.toInt()

    val list = mutableListOf<String>()

    for (i in 1..count)
        list.add(readLine()!!)

    val success = list.drop(1).fold(list[0] to true) { acc, word ->
        if (!acc.second)
            acc
        else if (list.count { it == word } > 1)
            "" to false
        else
            word to (acc.first.last() == word.first())
    }.second

    println(if (success) "Yes" else "No")
}