'use strict';

function main(arg) {
    const words = (arg.split("\n"));
    const memo  = new Set();
    
    words.shift();
    let lastLetter = words[0].slice(0, 1);

    for(let i=0; i<words.length; i++) {
        if(lastLetter == words[i].slice(0, 1) && !memo.has(words[i])) {
            lastLetter = words[i].slice(-1);
            memo.add(words[i]);
        } else {
            console.log('No');
            return;
        }
    }
    
    console.log('Yes');
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
