import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String s[] = new String[n];
    String answer = "Yes";
    for(int i=0;i<n;i++){
      s[i]=sc.next();
    }
    for(int i=0;i<n-1;i++){
      if(!s[i].substring(s[i].length()-1,s[i].length())
         .equals(s[i+1].substring(0,1))){
        answer="No";
        break;
      }
    }
    for(int i=0;i<n;i++){
      for(int j=i+1;j<n;j++){
        if(s[i].equals(s[j])){
          answer = "No";
        }
      }
    }
    System.out.println(answer);
           
          
      
    
  }
  

  
} 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 s[] = new String[n];
    String answer = "Yes";
    for(int i=0;i<n;i++){
      s[i]=sc.next();
    }
    for(int i=0;i<n-1;i++){
      if(!s[i].substring(s[i].length()-1,s[i].length())
         .equals(s[i+1].substring(0,1))){
        answer="No";
        break;
      }
    }
    for(int i=0;i<n;i++){
      for(int j=i+1;j<n;j++){
        if(s[i].equals(s[j])){
          answer = "No";
        }
      }
    }
    System.out.println(answer);
           
          
      
    
  }
  

  
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String s[] = new String[n];
    String answer = "Yes";
    for(int i=0;i<n;i++){
      s[i]=sc.next();
    }
    for(int i=0;i<n-1;i++){
      if(!s[i].substring(s[i].length()-1,s[i].length())
         .equals(s[i+1].substring(0,1))){
        answer="No";
        break;
      }
    }
    for(int i=0;i<n;i++){
      for(int j=i+1;j<n;j++){
        if(s[i].equals(s[j])){
          answer = "No";
        }
      }
    }
    System.out.println(answer);
           
          
      
    
  } main {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String s[] = new String[n];
    String answer = "Yes";
    for(int i=0;i<n;i++){
      s[i]=sc.next();
    }
    for(int i=0;i<n-1;i++){
      if(!s[i].substring(s[i].length()-1,s[i].length())
         .equals(s[i+1].substring(0,1))){
        answer="No";
        break;
      }
    }
    for(int i=0;i<n;i++){
      for(int j=i+1;j<n;j++){
        if(s[i].equals(s[j])){
          answer = "No";
        }
      }
    }
    System.out.println(answer);
           
          
      
    
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc String s[] = new String[n]; s new String[n] n String answer = "Yes"; answer "Yes" for(int i=0;i<n;i++){
      s[i]=sc.next();
    } int i=0; int i=0; i 0 i<n i n i++ i++ i {
      s[i]=sc.next();
    } {
      s[i]=sc.next();
    } s[i]=sc.next() s[i] s i sc.next() sc.next sc for(int i=0;i<n-1;i++){
      if(!s[i].substring(s[i].length()-1,s[i].length())
         .equals(s[i+1].substring(0,1))){
        answer="No";
        break;
      }
    } int i=0; int i=0; i 0 i<n-1 i n-1 n 1 i++ i++ i {
      if(!s[i].substring(s[i].length()-1,s[i].length())
         .equals(s[i+1].substring(0,1))){
        answer="No";
        break;
      }
    } {
      if(!s[i].substring(s[i].length()-1,s[i].length())
         .equals(s[i+1].substring(0,1))){
        answer="No";
        break;
      }
    } if(!s[i].substring(s[i].length()-1,s[i].length())
         .equals(s[i+1].substring(0,1))){
        answer="No";
        break;
      } !s[i].substring(s[i].length()-1,s[i].length())
         .equals(s[i+1].substring(0,1)) s[i].substring(s[i].length()-1,s[i].length())
         .equals(s[i+1].substring(0,1)) s[i].substring(s[i].length()-1,s[i].length())
         .equals s[i].substring(s[i].length()-1,s[i].length()) s[i].substring s[i] s i s[i].length()-1 s[i].length() s[i].length s[i] s i 1 s[i].length() s[i].length s[i] s i s[i+1].substring(0,1) s[i+1].substring s[i+1] s i+1 i 1 0 1 {
        answer="No";
        break;
      } answer="No" answer "No" break; for(int i=0;i<n;i++){
      for(int j=i+1;j<n;j++){
        if(s[i].equals(s[j])){
          answer = "No";
        }
      }
    } int i=0; int i=0; i 0 i<n i n i++ i++ i {
      for(int j=i+1;j<n;j++){
        if(s[i].equals(s[j])){
          answer = "No";
        }
      }
    } {
      for(int j=i+1;j<n;j++){
        if(s[i].equals(s[j])){
          answer = "No";
        }
      }
    } for(int j=i+1;j<n;j++){
        if(s[i].equals(s[j])){
          answer = "No";
        }
      } int j=i+1; int j=i+1; j i+1 i 1 j<n j n j++ j++ j {
        if(s[i].equals(s[j])){
          answer = "No";
        }
      } {
        if(s[i].equals(s[j])){
          answer = "No";
        }
      } if(s[i].equals(s[j])){
          answer = "No";
        } s[i].equals(s[j]) s[i].equals s[i] s i s[j] s j {
          answer = "No";
        } answer = "No" answer "No" System.out.println(answer) System.out.println System.out System System.out answer String[] args args public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String s[] = new String[n];
    String answer = "Yes";
    for(int i=0;i<n;i++){
      s[i]=sc.next();
    }
    for(int i=0;i<n-1;i++){
      if(!s[i].substring(s[i].length()-1,s[i].length())
         .equals(s[i+1].substring(0,1))){
        answer="No";
        break;
      }
    }
    for(int i=0;i<n;i++){
      for(int j=i+1;j<n;j++){
        if(s[i].equals(s[j])){
          answer = "No";
        }
      }
    }
    System.out.println(answer);
           
          
      
    
  }
  

  
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String s[] = new String[n];
    String answer = "Yes";
    for(int i=0;i<n;i++){
      s[i]=sc.next();
    }
    for(int i=0;i<n-1;i++){
      if(!s[i].substring(s[i].length()-1,s[i].length())
         .equals(s[i+1].substring(0,1))){
        answer="No";
        break;
      }
    }
    for(int i=0;i<n;i++){
      for(int j=i+1;j<n;j++){
        if(s[i].equals(s[j])){
          answer = "No";
        }
      }
    }
    System.out.println(answer);
           
          
      
    
  }
  

  
} Main
import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String s[] = new String[n];
    String answer = "Yes";
    for(int i=0;i<n;i++){
      s[i]=sc.next();
    }
    for(int i=0;i<n-1;i++){
      if(!s[i].substring(s[i].length()-1,s[i].length())
         .equals(s[i+1].substring(0,1))){
        answer="No";
        break;
      }
    }
    for(int i=0;i<n;i++){
      for(int j=i+1;j<n;j++){
        if(s[i].equals(s[j])){
          answer = "No";
        }
      }
    }
    System.out.println(answer);
           
          
      
    
  }
  

  
}