#include<stdio.h>
int main(void){
  char *s="python3 -c\""
"_,*l=open(0).readlines();print('YNeos'[any(a[-2]!=b[0]*l.count(a)for a,b in zip(l,l[1:]))::2])\n"
"\"";
  system(s);
  return 0;
}            