import java.util.*;
public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   int N = sc.nextInt();
   String[] words = new String[N];
   String ss = "";
   boolean flg = false;
   for(int i =0;i<N;i++) 
   {
     ss = sc.next();
     if(Arrays.asList(words).contains(ss))
     {
       flg = true;
       break;
     }
     words[i] = ss;
   }
   char start = words[0].charAt(words[0].length()-1);
   if(!flg)
   {
   		for(int i =1;i<N;i++) 
  		{
			if(start!=words[i].charAt(0))
            {
            	flg=true;
              	break;
            }
           	start = words[i].charAt(words[i].length()-1);
	  	}
   }
   if(flg) System.out.println("No");
   else System.out.println("Yes");
 }
} import java.util.*; util.* java public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   int N = sc.nextInt();
   String[] words = new String[N];
   String ss = "";
   boolean flg = false;
   for(int i =0;i<N;i++) 
   {
     ss = sc.next();
     if(Arrays.asList(words).contains(ss))
     {
       flg = true;
       break;
     }
     words[i] = ss;
   }
   char start = words[0].charAt(words[0].length()-1);
   if(!flg)
   {
   		for(int i =1;i<N;i++) 
  		{
			if(start!=words[i].charAt(0))
            {
            	flg=true;
              	break;
            }
           	start = words[i].charAt(words[i].length()-1);
	  	}
   }
   if(flg) System.out.println("No");
   else System.out.println("Yes");
 }
} Main public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   int N = sc.nextInt();
   String[] words = new String[N];
   String ss = "";
   boolean flg = false;
   for(int i =0;i<N;i++) 
   {
     ss = sc.next();
     if(Arrays.asList(words).contains(ss))
     {
       flg = true;
       break;
     }
     words[i] = ss;
   }
   char start = words[0].charAt(words[0].length()-1);
   if(!flg)
   {
   		for(int i =1;i<N;i++) 
  		{
			if(start!=words[i].charAt(0))
            {
            	flg=true;
              	break;
            }
           	start = words[i].charAt(words[i].length()-1);
	  	}
   }
   if(flg) System.out.println("No");
   else System.out.println("Yes");
 } main {
   Scanner sc = new Scanner(System.in);
   int N = sc.nextInt();
   String[] words = new String[N];
   String ss = "";
   boolean flg = false;
   for(int i =0;i<N;i++) 
   {
     ss = sc.next();
     if(Arrays.asList(words).contains(ss))
     {
       flg = true;
       break;
     }
     words[i] = ss;
   }
   char start = words[0].charAt(words[0].length()-1);
   if(!flg)
   {
   		for(int i =1;i<N;i++) 
  		{
			if(start!=words[i].charAt(0))
            {
            	flg=true;
              	break;
            }
           	start = words[i].charAt(words[i].length()-1);
	  	}
   }
   if(flg) System.out.println("No");
   else System.out.println("Yes");
 } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc String[] words = new String[N]; words new String[N] N String ss = ""; ss "" boolean flg = false; flg false for(int i =0;i<N;i++) 
   {
     ss = sc.next();
     if(Arrays.asList(words).contains(ss))
     {
       flg = true;
       break;
     }
     words[i] = ss;
   } int i =0; int i =0; i 0 i<N i N i++ i++ i {
     ss = sc.next();
     if(Arrays.asList(words).contains(ss))
     {
       flg = true;
       break;
     }
     words[i] = ss;
   } {
     ss = sc.next();
     if(Arrays.asList(words).contains(ss))
     {
       flg = true;
       break;
     }
     words[i] = ss;
   } ss = sc.next() ss sc.next() sc.next sc if(Arrays.asList(words).contains(ss))
     {
       flg = true;
       break;
     } Arrays.asList(words).contains(ss) Arrays.asList(words).contains Arrays.asList(words) Arrays.asList Arrays words ss {
       flg = true;
       break;
     } flg = true flg true break; words[i] = ss words[i] words i ss char start = words[0].charAt(words[0].length()-1); start words[0].charAt(words[0].length()-1) words[0].charAt words[0] words 0 words[0].length()-1 words[0].length() words[0].length words[0] words 0 1 if(!flg)
   {
   		for(int i =1;i<N;i++) 
  		{
			if(start!=words[i].charAt(0))
            {
            	flg=true;
              	break;
            }
           	start = words[i].charAt(words[i].length()-1);
	  	}
   } !flg flg {
   		for(int i =1;i<N;i++) 
  		{
			if(start!=words[i].charAt(0))
            {
            	flg=true;
              	break;
            }
           	start = words[i].charAt(words[i].length()-1);
	  	}
   } for(int i =1;i<N;i++) 
  		{
			if(start!=words[i].charAt(0))
            {
            	flg=true;
              	break;
            }
           	start = words[i].charAt(words[i].length()-1);
	  	} int i =1; int i =1; i 1 i<N i N i++ i++ i {
			if(start!=words[i].charAt(0))
            {
            	flg=true;
              	break;
            }
           	start = words[i].charAt(words[i].length()-1);
	  	} {
			if(start!=words[i].charAt(0))
            {
            	flg=true;
              	break;
            }
           	start = words[i].charAt(words[i].length()-1);
	  	} if(start!=words[i].charAt(0))
            {
            	flg=true;
              	break;
            } start!=words[i].charAt(0) start words[i].charAt(0) words[i].charAt words[i] words i 0 {
            	flg=true;
              	break;
            } flg=true flg true break; start = words[i].charAt(words[i].length()-1) start words[i].charAt(words[i].length()-1) words[i].charAt words[i] words i words[i].length()-1 words[i].length() words[i].length words[i] words i 1 if(flg) System.out.println("No");
   else System.out.println("Yes"); flg System.out.println("No") System.out.println System.out System System.out "No" System.out.println("Yes") System.out.println System.out System System.out "Yes" String[] args args public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   int N = sc.nextInt();
   String[] words = new String[N];
   String ss = "";
   boolean flg = false;
   for(int i =0;i<N;i++) 
   {
     ss = sc.next();
     if(Arrays.asList(words).contains(ss))
     {
       flg = true;
       break;
     }
     words[i] = ss;
   }
   char start = words[0].charAt(words[0].length()-1);
   if(!flg)
   {
   		for(int i =1;i<N;i++) 
  		{
			if(start!=words[i].charAt(0))
            {
            	flg=true;
              	break;
            }
           	start = words[i].charAt(words[i].length()-1);
	  	}
   }
   if(flg) System.out.println("No");
   else System.out.println("Yes");
 }
} public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   int N = sc.nextInt();
   String[] words = new String[N];
   String ss = "";
   boolean flg = false;
   for(int i =0;i<N;i++) 
   {
     ss = sc.next();
     if(Arrays.asList(words).contains(ss))
     {
       flg = true;
       break;
     }
     words[i] = ss;
   }
   char start = words[0].charAt(words[0].length()-1);
   if(!flg)
   {
   		for(int i =1;i<N;i++) 
  		{
			if(start!=words[i].charAt(0))
            {
            	flg=true;
              	break;
            }
           	start = words[i].charAt(words[i].length()-1);
	  	}
   }
   if(flg) System.out.println("No");
   else System.out.println("Yes");
 }
} Main
import java.util.*;
public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   int N = sc.nextInt();
   String[] words = new String[N];
   String ss = "";
   boolean flg = false;
   for(int i =0;i<N;i++) 
   {
     ss = sc.next();
     if(Arrays.asList(words).contains(ss))
     {
       flg = true;
       break;
     }
     words[i] = ss;
   }
   char start = words[0].charAt(words[0].length()-1);
   if(!flg)
   {
   		for(int i =1;i<N;i++) 
  		{
			if(start!=words[i].charAt(0))
            {
            	flg=true;
              	break;
            }
           	start = words[i].charAt(words[i].length()-1);
	  	}
   }
   if(flg) System.out.println("No");
   else System.out.println("Yes");
 }
}