function main(input) {
  var args = input.split('\n');
  var N = args[0];
  var wards = args.slice(1,N + 1);
  var head;
  var tail;
  var flag = true;
  wards.forEach((ward, index) => {
    if(index == 0){
	  tail = ward.slice(-1);
      return;
    }
    head = ward.slice(0,1);
    if(head != tail){
      flag = false;
    }
    tail = ward.slice(-1);
  })
  console.log(flag ? 'Yes' : 'No');
}
 
main(require('fs').readFileSync('/dev/stdin', 'utf8'));