function main(input) {
  input=input.trim();
  const N = parseInt(input.split(" ")[0], 10);
  const W = input.split('\n').map((n)=>(n));
  W.shift();
  var ans=0;
  for(var i=1; i<N; i++){
    if(W[i].slice(0,1)==W[i-1].slice(-1)){
    }else{
      ans++
    }
  }
  var c = W.filter(function (x, i, self) {
    return self.indexOf(x) !== self.lastIndexOf(x);
  });
  if(c.length==0&&ans==0){
    console.log("Yes");
  }else{
    console.log("No");
  }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));



