l = require("fs").readFileSync("/dev/stdin","utf8").split(/\r?\n/);
a = {}; p = 0; r = 1;
l.shift();
for (const w of l) {
  if (p!==0 && ([...p].pop() != w[0] || a[w])) {r = 0;break}
  a[p = w] = 1;
}
console.log(r?"Yes":"No")