import java.util.*;
import java.io.*;

public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    String[] str = new String[n];
    boolean flag = true;

    for(int i = 0; i < n; i++){
      str[i] = scan.next();
      if(i > 0 && (str[i-1].charAt(str[i-1].length()-1) != str[i].charAt(0))){
        flag = false;
      }
    }

    if(flag == true){
      Arrays.sort(str);
      for(int i = 0; i < n-1; i++){
        if(str[i].equals(str[i+1])){
          flag = false;
          break;
        }
      }
    }

    if(flag == true)
      System.out.println("Yes");
    else
    System.out.println("No");

  }
} import java.util.*; util.* java import java.io.*; io.* java public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    String[] str = new String[n];
    boolean flag = true;

    for(int i = 0; i < n; i++){
      str[i] = scan.next();
      if(i > 0 && (str[i-1].charAt(str[i-1].length()-1) != str[i].charAt(0))){
        flag = false;
      }
    }

    if(flag == true){
      Arrays.sort(str);
      for(int i = 0; i < n-1; i++){
        if(str[i].equals(str[i+1])){
          flag = false;
          break;
        }
      }
    }

    if(flag == true)
      System.out.println("Yes");
    else
    System.out.println("No");

  }
} Main public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    String[] str = new String[n];
    boolean flag = true;

    for(int i = 0; i < n; i++){
      str[i] = scan.next();
      if(i > 0 && (str[i-1].charAt(str[i-1].length()-1) != str[i].charAt(0))){
        flag = false;
      }
    }

    if(flag == true){
      Arrays.sort(str);
      for(int i = 0; i < n-1; i++){
        if(str[i].equals(str[i+1])){
          flag = false;
          break;
        }
      }
    }

    if(flag == true)
      System.out.println("Yes");
    else
    System.out.println("No");

  } main {
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    String[] str = new String[n];
    boolean flag = true;

    for(int i = 0; i < n; i++){
      str[i] = scan.next();
      if(i > 0 && (str[i-1].charAt(str[i-1].length()-1) != str[i].charAt(0))){
        flag = false;
      }
    }

    if(flag == true){
      Arrays.sort(str);
      for(int i = 0; i < n-1; i++){
        if(str[i].equals(str[i+1])){
          flag = false;
          break;
        }
      }
    }

    if(flag == true)
      System.out.println("Yes");
    else
    System.out.println("No");

  } 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 boolean flag = true; flag true for(int i = 0; i < n; i++){
      str[i] = scan.next();
      if(i > 0 && (str[i-1].charAt(str[i-1].length()-1) != str[i].charAt(0))){
        flag = false;
      }
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      str[i] = scan.next();
      if(i > 0 && (str[i-1].charAt(str[i-1].length()-1) != str[i].charAt(0))){
        flag = false;
      }
    } {
      str[i] = scan.next();
      if(i > 0 && (str[i-1].charAt(str[i-1].length()-1) != str[i].charAt(0))){
        flag = false;
      }
    } str[i] = scan.next() str[i] str i scan.next() scan.next scan if(i > 0 && (str[i-1].charAt(str[i-1].length()-1) != str[i].charAt(0))){
        flag = false;
      } i > 0 && (str[i-1].charAt(str[i-1].length()-1) != str[i].charAt(0)) i > 0 i 0 (str[i-1].charAt(str[i-1].length()-1) != str[i].charAt(0)) str[i-1].charAt(str[i-1].length()-1) str[i-1].charAt str[i-1] str i-1 i 1 str[i-1].length()-1 str[i-1].length() str[i-1].length str[i-1] str i-1 i 1 1 str[i].charAt(0) str[i].charAt str[i] str i 0 {
        flag = false;
      } flag = false flag false if(flag == true){
      Arrays.sort(str);
      for(int i = 0; i < n-1; i++){
        if(str[i].equals(str[i+1])){
          flag = false;
          break;
        }
      }
    } flag == true flag true {
      Arrays.sort(str);
      for(int i = 0; i < n-1; i++){
        if(str[i].equals(str[i+1])){
          flag = false;
          break;
        }
      }
    } Arrays.sort(str) Arrays.sort Arrays str for(int i = 0; i < n-1; i++){
        if(str[i].equals(str[i+1])){
          flag = false;
          break;
        }
      } int i = 0; int i = 0; i 0 i < n-1 i n-1 n 1 i++ i++ i {
        if(str[i].equals(str[i+1])){
          flag = false;
          break;
        }
      } {
        if(str[i].equals(str[i+1])){
          flag = false;
          break;
        }
      } if(str[i].equals(str[i+1])){
          flag = false;
          break;
        } str[i].equals(str[i+1]) str[i].equals str[i] str i str[i+1] str i+1 i 1 {
          flag = false;
          break;
        } flag = false flag false break; if(flag == true)
      System.out.println("Yes");
    else
    System.out.println("No"); flag == true flag true System.out.println("Yes") System.out.println System.out System System.out "Yes" System.out.println("No") System.out.println System.out System System.out "No" String[] args args public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    String[] str = new String[n];
    boolean flag = true;

    for(int i = 0; i < n; i++){
      str[i] = scan.next();
      if(i > 0 && (str[i-1].charAt(str[i-1].length()-1) != str[i].charAt(0))){
        flag = false;
      }
    }

    if(flag == true){
      Arrays.sort(str);
      for(int i = 0; i < n-1; i++){
        if(str[i].equals(str[i+1])){
          flag = false;
          break;
        }
      }
    }

    if(flag == true)
      System.out.println("Yes");
    else
    System.out.println("No");

  }
} public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    String[] str = new String[n];
    boolean flag = true;

    for(int i = 0; i < n; i++){
      str[i] = scan.next();
      if(i > 0 && (str[i-1].charAt(str[i-1].length()-1) != str[i].charAt(0))){
        flag = false;
      }
    }

    if(flag == true){
      Arrays.sort(str);
      for(int i = 0; i < n-1; i++){
        if(str[i].equals(str[i+1])){
          flag = false;
          break;
        }
      }
    }

    if(flag == true)
      System.out.println("Yes");
    else
    System.out.println("No");

  }
} Main
import java.util.*;
import java.io.*;

public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    String[] str = new String[n];
    boolean flag = true;

    for(int i = 0; i < n; i++){
      str[i] = scan.next();
      if(i > 0 && (str[i-1].charAt(str[i-1].length()-1) != str[i].charAt(0))){
        flag = false;
      }
    }

    if(flag == true){
      Arrays.sort(str);
      for(int i = 0; i < n-1; i++){
        if(str[i].equals(str[i+1])){
          flag = false;
          break;
        }
      }
    }

    if(flag == true)
      System.out.println("Yes");
    else
    System.out.println("No");

  }
}
