function myout(text){console.log(text);}//standard output
function Main(input) {
	//input = parseInt(input);
	//input = input.split(" ");
	input = input.split("\n");
	//input = input.split(" ").map((a)=>Number(a));
	//input = input.split("\n").map((a)=>Number(a));
  var list = [];
  for(var i = 1; i < input.length; i++){
    if(i == 1){
       list.push(input[i]);
       }else{
       	if(list.indexOf(input[i]) == -1){
           var tmp = list[list.length - 1].split("");
          tmp = tmp[tmp.length - 1];
          var tmp2 = input[i].slice(0,1);
          //myout(tmp2);
          if(tmp == tmp2){
             list.push(input[i]);
             }else{
               myout("No");
            return;
             }
          }else{
           myout("No");
            return;
          }
       }
  }
  myout("Yes");
}

Main(require("fs").readFileSync("/dev/stdin", "utf8").trim());
