fun main(args: Array<String>) {
    val N = readLine()!!.toInt()
    val W = Array(N) { readLine()!! }

    val areNotDuplicated = W.toSet().size == N
    val areMatched = W.reduce { old, new -> if (old.last() == new.first()) { new.last().toString() } else  "-" } != "-"

    println(if (areNotDuplicated && areMatched) "Yes" else "No")
}