function main(arg) {
    arg = arg.trim().split("\n")
    arg.shift()
    const MAX = arg.length
    
    var distinct = arg.filter(function(x, i, self){
        return self.indexOf(x) === i && i !== self.lastIndexOf(x);
    });
    
    if (distinct.length > 0) {
        console.log("No")
        return
    }
    var flag = true
    for (var i = 1; i< MAX;i++) {
        var text = arg[i]
        var last_text = arg[i - 1]
        if (last_text[last_text.length - 1] !== text[0]) {
            flag = false
            break;
        }
    }
    if (!flag) {
        console.log("No")
    } else {
        console.log("Yes")
    }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));