import java.util.Scanner;
import java.util.Set;
import java.util.HashSet;

class Main{
  public static void main(String args[]){
    Set<String> used_words = new HashSet<String>();
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    
    boolean flag = true;
    String previous = scan.next();
    used_words.add(previous);
    for(int i=1;i<n;i++){
      String current = scan.next();
      if(!used_words.add(current)||previous.charAt(previous.length()-1)!=current.charAt(0)){
        flag=false;
        break;
      }else{
        previous=current;
      }
    }
    scan.close();
    System.out.println(flag?"Yes":"No");
    return;
  }//main
}//Main import java.util.Scanner; Scanner java.util import java.util.Set; Set java.util import java.util.HashSet; HashSet java.util class Main{
  public static void main(String args[]){
    Set<String> used_words = new HashSet<String>();
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    
    boolean flag = true;
    String previous = scan.next();
    used_words.add(previous);
    for(int i=1;i<n;i++){
      String current = scan.next();
      if(!used_words.add(current)||previous.charAt(previous.length()-1)!=current.charAt(0)){
        flag=false;
        break;
      }else{
        previous=current;
      }
    }
    scan.close();
    System.out.println(flag?"Yes":"No");
    return;
  }//main
}//Main Main public static void main(String args[]){
    Set<String> used_words = new HashSet<String>();
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    
    boolean flag = true;
    String previous = scan.next();
    used_words.add(previous);
    for(int i=1;i<n;i++){
      String current = scan.next();
      if(!used_words.add(current)||previous.charAt(previous.length()-1)!=current.charAt(0)){
        flag=false;
        break;
      }else{
        previous=current;
      }
    }
    scan.close();
    System.out.println(flag?"Yes":"No");
    return;
  }//main main {
    Set<String> used_words = new HashSet<String>();
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    
    boolean flag = true;
    String previous = scan.next();
    used_words.add(previous);
    for(int i=1;i<n;i++){
      String current = scan.next();
      if(!used_words.add(current)||previous.charAt(previous.length()-1)!=current.charAt(0)){
        flag=false;
        break;
      }else{
        previous=current;
      }
    }
    scan.close();
    System.out.println(flag?"Yes":"No");
    return;
  } Set<String> used_words = new HashSet<String>(); used_words new HashSet<String>() Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan boolean flag = true; flag true String previous = scan.next(); previous scan.next() scan.next scan used_words.add(previous) used_words.add used_words previous for(int i=1;i<n;i++){
      String current = scan.next();
      if(!used_words.add(current)||previous.charAt(previous.length()-1)!=current.charAt(0)){
        flag=false;
        break;
      }else{
        previous=current;
      }
    } int i=1; int i=1; i 1 i<n i n i++ i++ i {
      String current = scan.next();
      if(!used_words.add(current)||previous.charAt(previous.length()-1)!=current.charAt(0)){
        flag=false;
        break;
      }else{
        previous=current;
      }
    } {
      String current = scan.next();
      if(!used_words.add(current)||previous.charAt(previous.length()-1)!=current.charAt(0)){
        flag=false;
        break;
      }else{
        previous=current;
      }
    } String current = scan.next(); current scan.next() scan.next scan if(!used_words.add(current)||previous.charAt(previous.length()-1)!=current.charAt(0)){
        flag=false;
        break;
      }else{
        previous=current;
      } !used_words.add(current)||previous.charAt(previous.length()-1)!=current.charAt(0) !used_words.add(current) used_words.add(current) used_words.add used_words current previous.charAt(previous.length()-1)!=current.charAt(0) previous.charAt(previous.length()-1) previous.charAt previous previous.length()-1 previous.length() previous.length previous 1 current.charAt(0) current.charAt current 0 {
        flag=false;
        break;
      } flag=false flag false break; {
        previous=current;
      } previous=current previous current scan.close() scan.close scan System.out.println(flag?"Yes":"No") System.out.println System.out System System.out flag?"Yes":"No" flag "Yes" "No" return; String args[] args
import java.util.Scanner;
import java.util.Set;
import java.util.HashSet;

class Main{
  public static void main(String args[]){
    Set<String> used_words = new HashSet<String>();
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    
    boolean flag = true;
    String previous = scan.next();
    used_words.add(previous);
    for(int i=1;i<n;i++){
      String current = scan.next();
      if(!used_words.add(current)||previous.charAt(previous.length()-1)!=current.charAt(0)){
        flag=false;
        break;
      }else{
        previous=current;
      }
    }
    scan.close();
    System.out.println(flag?"Yes":"No");
    return;
  }//main
}//Main