import java.util.*;

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

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