import java.util.Scanner;

public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String[] words = new String[n];
    for(int i = 0; i < n; i++) {
      words[i] = sc.next();
    }
    boolean judge = true;
    for(int i = 0; i < n; i++) {
      for(int j = i + 1; j < n; j++) {
        if(j == n) {
          break;
        }else if (words[i].equals(words[j])) {
          System.out.println("No");
          return;
        }
      }
    }
    for(int i = 0; i < n - 1; i++) {
      if(words[i].charAt(words[i].length() - 1) != words[i + 1].charAt(0)) {
        System.out.println("No");
        return;
      }
    }
    System.out.println("Yes");
  }

} import java.util.Scanner; Scanner 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];
    for(int i = 0; i < n; i++) {
      words[i] = sc.next();
    }
    boolean judge = true;
    for(int i = 0; i < n; i++) {
      for(int j = i + 1; j < n; j++) {
        if(j == n) {
          break;
        }else if (words[i].equals(words[j])) {
          System.out.println("No");
          return;
        }
      }
    }
    for(int i = 0; i < n - 1; i++) {
      if(words[i].charAt(words[i].length() - 1) != words[i + 1].charAt(0)) {
        System.out.println("No");
        return;
      }
    }
    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];
    for(int i = 0; i < n; i++) {
      words[i] = sc.next();
    }
    boolean judge = true;
    for(int i = 0; i < n; i++) {
      for(int j = i + 1; j < n; j++) {
        if(j == n) {
          break;
        }else if (words[i].equals(words[j])) {
          System.out.println("No");
          return;
        }
      }
    }
    for(int i = 0; i < n - 1; i++) {
      if(words[i].charAt(words[i].length() - 1) != words[i + 1].charAt(0)) {
        System.out.println("No");
        return;
      }
    }
    System.out.println("Yes");
  } main {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String[] words = new String[n];
    for(int i = 0; i < n; i++) {
      words[i] = sc.next();
    }
    boolean judge = true;
    for(int i = 0; i < n; i++) {
      for(int j = i + 1; j < n; j++) {
        if(j == n) {
          break;
        }else if (words[i].equals(words[j])) {
          System.out.println("No");
          return;
        }
      }
    }
    for(int i = 0; i < n - 1; i++) {
      if(words[i].charAt(words[i].length() - 1) != words[i + 1].charAt(0)) {
        System.out.println("No");
        return;
      }
    }
    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 for(int i = 0; i < n; i++) {
      words[i] = sc.next();
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      words[i] = sc.next();
    } {
      words[i] = sc.next();
    } words[i] = sc.next() words[i] words i sc.next() sc.next sc boolean judge = true; judge true for(int i = 0; i < n; i++) {
      for(int j = i + 1; j < n; j++) {
        if(j == n) {
          break;
        }else if (words[i].equals(words[j])) {
          System.out.println("No");
          return;
        }
      }
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      for(int j = i + 1; j < n; j++) {
        if(j == n) {
          break;
        }else if (words[i].equals(words[j])) {
          System.out.println("No");
          return;
        }
      }
    } {
      for(int j = i + 1; j < n; j++) {
        if(j == n) {
          break;
        }else if (words[i].equals(words[j])) {
          System.out.println("No");
          return;
        }
      }
    } for(int j = i + 1; j < n; j++) {
        if(j == n) {
          break;
        }else if (words[i].equals(words[j])) {
          System.out.println("No");
          return;
        }
      } int j = i + 1; int j = i + 1; j i + 1 i 1 j < n j n j++ j++ j {
        if(j == n) {
          break;
        }else if (words[i].equals(words[j])) {
          System.out.println("No");
          return;
        }
      } {
        if(j == n) {
          break;
        }else if (words[i].equals(words[j])) {
          System.out.println("No");
          return;
        }
      } if(j == n) {
          break;
        }else if (words[i].equals(words[j])) {
          System.out.println("No");
          return;
        } j == n j n {
          break;
        } break; if (words[i].equals(words[j])) {
          System.out.println("No");
          return;
        } words[i].equals(words[j]) words[i].equals words[i] words i words[j] words j {
          System.out.println("No");
          return;
        } System.out.println("No") System.out.println System.out System System.out "No" return; for(int i = 0; i < n - 1; i++) {
      if(words[i].charAt(words[i].length() - 1) != words[i + 1].charAt(0)) {
        System.out.println("No");
        return;
      }
    } int i = 0; int i = 0; i 0 i < n - 1 i n - 1 n 1 i++ i++ i {
      if(words[i].charAt(words[i].length() - 1) != words[i + 1].charAt(0)) {
        System.out.println("No");
        return;
      }
    } {
      if(words[i].charAt(words[i].length() - 1) != words[i + 1].charAt(0)) {
        System.out.println("No");
        return;
      }
    } if(words[i].charAt(words[i].length() - 1) != words[i + 1].charAt(0)) {
        System.out.println("No");
        return;
      } words[i].charAt(words[i].length() - 1) != words[i + 1].charAt(0) 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 words[i + 1].charAt(0) words[i + 1].charAt words[i + 1] words i + 1 i 1 0 {
        System.out.println("No");
        return;
      } System.out.println("No") System.out.println System.out System System.out "No" return; 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];
    for(int i = 0; i < n; i++) {
      words[i] = sc.next();
    }
    boolean judge = true;
    for(int i = 0; i < n; i++) {
      for(int j = i + 1; j < n; j++) {
        if(j == n) {
          break;
        }else if (words[i].equals(words[j])) {
          System.out.println("No");
          return;
        }
      }
    }
    for(int i = 0; i < n - 1; i++) {
      if(words[i].charAt(words[i].length() - 1) != words[i + 1].charAt(0)) {
        System.out.println("No");
        return;
      }
    }
    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];
    for(int i = 0; i < n; i++) {
      words[i] = sc.next();
    }
    boolean judge = true;
    for(int i = 0; i < n; i++) {
      for(int j = i + 1; j < n; j++) {
        if(j == n) {
          break;
        }else if (words[i].equals(words[j])) {
          System.out.println("No");
          return;
        }
      }
    }
    for(int i = 0; i < n - 1; i++) {
      if(words[i].charAt(words[i].length() - 1) != words[i + 1].charAt(0)) {
        System.out.println("No");
        return;
      }
    }
    System.out.println("Yes");
  }

} Main
import java.util.Scanner;

public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String[] words = new String[n];
    for(int i = 0; i < n; i++) {
      words[i] = sc.next();
    }
    boolean judge = true;
    for(int i = 0; i < n; i++) {
      for(int j = i + 1; j < n; j++) {
        if(j == n) {
          break;
        }else if (words[i].equals(words[j])) {
          System.out.println("No");
          return;
        }
      }
    }
    for(int i = 0; i < n - 1; i++) {
      if(words[i].charAt(words[i].length() - 1) != words[i + 1].charAt(0)) {
        System.out.println("No");
        return;
      }
    }
    System.out.println("Yes");
  }

}
