import java.util.*;
class Main
{
  public static void main(String[] args) {
    
    Scanner scan =new Scanner(System.in);
    int n = scan.nextInt();
   	String[] str = new String[n];
       int count = 0 ;
    ArrayList<String> st = new ArrayList<String>();
      for(int i = 0 ; i<n ; i++){
      str[i] = scan.next();
        if(st.contains(str[i])){
        count++;
        break;
      }else{
        st.add(str[i]);
      }
    }
    
 	if(count==0){
      for(int i = 0 ; i<n-1 ; i++){

        if(str[i].charAt(str[i].length()-1) != str[i+1].charAt(0)){
          count++;
          break;
        } 
      }
    }
    if(count!=0){
      System.out.println("No");
    }else{
      
      System.out.println("Yes");
    }
  }
} import java.util.*; util.* java class Main
{
  public static void main(String[] args) {
    
    Scanner scan =new Scanner(System.in);
    int n = scan.nextInt();
   	String[] str = new String[n];
       int count = 0 ;
    ArrayList<String> st = new ArrayList<String>();
      for(int i = 0 ; i<n ; i++){
      str[i] = scan.next();
        if(st.contains(str[i])){
        count++;
        break;
      }else{
        st.add(str[i]);
      }
    }
    
 	if(count==0){
      for(int i = 0 ; i<n-1 ; i++){

        if(str[i].charAt(str[i].length()-1) != str[i+1].charAt(0)){
          count++;
          break;
        } 
      }
    }
    if(count!=0){
      System.out.println("No");
    }else{
      
      System.out.println("Yes");
    }
  }
} Main public static void main(String[] args) {
    
    Scanner scan =new Scanner(System.in);
    int n = scan.nextInt();
   	String[] str = new String[n];
       int count = 0 ;
    ArrayList<String> st = new ArrayList<String>();
      for(int i = 0 ; i<n ; i++){
      str[i] = scan.next();
        if(st.contains(str[i])){
        count++;
        break;
      }else{
        st.add(str[i]);
      }
    }
    
 	if(count==0){
      for(int i = 0 ; i<n-1 ; i++){

        if(str[i].charAt(str[i].length()-1) != str[i+1].charAt(0)){
          count++;
          break;
        } 
      }
    }
    if(count!=0){
      System.out.println("No");
    }else{
      
      System.out.println("Yes");
    }
  } main {
    
    Scanner scan =new Scanner(System.in);
    int n = scan.nextInt();
   	String[] str = new String[n];
       int count = 0 ;
    ArrayList<String> st = new ArrayList<String>();
      for(int i = 0 ; i<n ; i++){
      str[i] = scan.next();
        if(st.contains(str[i])){
        count++;
        break;
      }else{
        st.add(str[i]);
      }
    }
    
 	if(count==0){
      for(int i = 0 ; i<n-1 ; i++){

        if(str[i].charAt(str[i].length()-1) != str[i+1].charAt(0)){
          count++;
          break;
        } 
      }
    }
    if(count!=0){
      System.out.println("No");
    }else{
      
      System.out.println("Yes");
    }
  } Scanner scan =new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan String[] str = new String[n]; str new String[n] n int count = 0 ; count 0 ArrayList<String> st = new ArrayList<String>(); st new ArrayList<String>() for(int i = 0 ; i<n ; i++){
      str[i] = scan.next();
        if(st.contains(str[i])){
        count++;
        break;
      }else{
        st.add(str[i]);
      }
    } int i = 0 ; int i = 0 ; i 0 i<n i n i++ i++ i {
      str[i] = scan.next();
        if(st.contains(str[i])){
        count++;
        break;
      }else{
        st.add(str[i]);
      }
    } {
      str[i] = scan.next();
        if(st.contains(str[i])){
        count++;
        break;
      }else{
        st.add(str[i]);
      }
    } str[i] = scan.next() str[i] str i scan.next() scan.next scan if(st.contains(str[i])){
        count++;
        break;
      }else{
        st.add(str[i]);
      } st.contains(str[i]) st.contains st str[i] str i {
        count++;
        break;
      } count++ count break; {
        st.add(str[i]);
      } st.add(str[i]) st.add st str[i] str i if(count==0){
      for(int i = 0 ; i<n-1 ; i++){

        if(str[i].charAt(str[i].length()-1) != str[i+1].charAt(0)){
          count++;
          break;
        } 
      }
    } count==0 count 0 {
      for(int i = 0 ; i<n-1 ; i++){

        if(str[i].charAt(str[i].length()-1) != str[i+1].charAt(0)){
          count++;
          break;
        } 
      }
    } for(int i = 0 ; i<n-1 ; i++){

        if(str[i].charAt(str[i].length()-1) != str[i+1].charAt(0)){
          count++;
          break;
        } 
      } int i = 0 ; int i = 0 ; i 0 i<n-1 i n-1 n 1 i++ i++ i {

        if(str[i].charAt(str[i].length()-1) != str[i+1].charAt(0)){
          count++;
          break;
        } 
      } {

        if(str[i].charAt(str[i].length()-1) != str[i+1].charAt(0)){
          count++;
          break;
        } 
      } if(str[i].charAt(str[i].length()-1) != str[i+1].charAt(0)){
          count++;
          break;
        } str[i].charAt(str[i].length()-1) != str[i+1].charAt(0) str[i].charAt(str[i].length()-1) str[i].charAt str[i] str i str[i].length()-1 str[i].length() str[i].length str[i] str i 1 str[i+1].charAt(0) str[i+1].charAt str[i+1] str i+1 i 1 0 {
          count++;
          break;
        } count++ count break; if(count!=0){
      System.out.println("No");
    }else{
      
      System.out.println("Yes");
    } count!=0 count 0 {
      System.out.println("No");
    } System.out.println("No") System.out.println System.out System System.out "No" {
      
      System.out.println("Yes");
    } System.out.println("Yes") System.out.println System.out System System.out "Yes" String[] args args
import java.util.*;
class Main
{
  public static void main(String[] args) {
    
    Scanner scan =new Scanner(System.in);
    int n = scan.nextInt();
   	String[] str = new String[n];
       int count = 0 ;
    ArrayList<String> st = new ArrayList<String>();
      for(int i = 0 ; i<n ; i++){
      str[i] = scan.next();
        if(st.contains(str[i])){
        count++;
        break;
      }else{
        st.add(str[i]);
      }
    }
    
 	if(count==0){
      for(int i = 0 ; i<n-1 ; i++){

        if(str[i].charAt(str[i].length()-1) != str[i+1].charAt(0)){
          count++;
          break;
        } 
      }
    }
    if(count!=0){
      System.out.println("No");
    }else{
      
      System.out.println("Yes");
    }
  }
}
