fun main(array: Array<String>) {
    val n = readLine()!!.toInt()
    val list = mutableListOf<String>()
    for(i in 0 until n) {
        val s = readLine()!!
        if(i == 0) {
            list.add(s)
            continue
        }
        for(j in list.indices) {
            if(s == list[j]) {
                print("No")
                return
            }
        }
        if(s[0] == list[i-1][list[i-1].length-1]) {
        }
        else {
            print("No")
            return
        }
        list.add(s)
    }
    print("Yes")
}