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