import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    HashMap<String, Integer> map = new HashMap<>();
    boolean flag = true;
    String s = sc.next();
    map.put(s, 1);
    char s_last = s.charAt(s.length() - 1);
    for (int i = 1; i < n; i++) {
      s = sc.next();
      char s_first = s.charAt(0);
      if (map.containsKey(s)) {
        flag = false;
      }
      if (s_last != s_first) {
        flag = false;
      }
      map.put(s, 1);
      s_last = s.charAt(s.length() - 1);
    }
    if (flag) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    HashMap<String, Integer> map = new HashMap<>();
    boolean flag = true;
    String s = sc.next();
    map.put(s, 1);
    char s_last = s.charAt(s.length() - 1);
    for (int i = 1; i < n; i++) {
      s = sc.next();
      char s_first = s.charAt(0);
      if (map.containsKey(s)) {
        flag = false;
      }
      if (s_last != s_first) {
        flag = false;
      }
      map.put(s, 1);
      s_last = s.charAt(s.length() - 1);
    }
    if (flag) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    HashMap<String, Integer> map = new HashMap<>();
    boolean flag = true;
    String s = sc.next();
    map.put(s, 1);
    char s_last = s.charAt(s.length() - 1);
    for (int i = 1; i < n; i++) {
      s = sc.next();
      char s_first = s.charAt(0);
      if (map.containsKey(s)) {
        flag = false;
      }
      if (s_last != s_first) {
        flag = false;
      }
      map.put(s, 1);
      s_last = s.charAt(s.length() - 1);
    }
    if (flag) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
  } main {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    HashMap<String, Integer> map = new HashMap<>();
    boolean flag = true;
    String s = sc.next();
    map.put(s, 1);
    char s_last = s.charAt(s.length() - 1);
    for (int i = 1; i < n; i++) {
      s = sc.next();
      char s_first = s.charAt(0);
      if (map.containsKey(s)) {
        flag = false;
      }
      if (s_last != s_first) {
        flag = false;
      }
      map.put(s, 1);
      s_last = s.charAt(s.length() - 1);
    }
    if (flag) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc HashMap<String, Integer> map = new HashMap<>(); map new HashMap<>() boolean flag = true; flag true String s = sc.next(); s sc.next() sc.next sc map.put(s, 1) map.put map s 1 char s_last = s.charAt(s.length() - 1); s_last s.charAt(s.length() - 1) s.charAt s s.length() - 1 s.length() s.length s 1 for (int i = 1; i < n; i++) {
      s = sc.next();
      char s_first = s.charAt(0);
      if (map.containsKey(s)) {
        flag = false;
      }
      if (s_last != s_first) {
        flag = false;
      }
      map.put(s, 1);
      s_last = s.charAt(s.length() - 1);
    } int i = 1; int i = 1; i 1 i < n i n i++ i++ i {
      s = sc.next();
      char s_first = s.charAt(0);
      if (map.containsKey(s)) {
        flag = false;
      }
      if (s_last != s_first) {
        flag = false;
      }
      map.put(s, 1);
      s_last = s.charAt(s.length() - 1);
    } {
      s = sc.next();
      char s_first = s.charAt(0);
      if (map.containsKey(s)) {
        flag = false;
      }
      if (s_last != s_first) {
        flag = false;
      }
      map.put(s, 1);
      s_last = s.charAt(s.length() - 1);
    } s = sc.next() s sc.next() sc.next sc char s_first = s.charAt(0); s_first s.charAt(0) s.charAt s 0 if (map.containsKey(s)) {
        flag = false;
      } map.containsKey(s) map.containsKey map s {
        flag = false;
      } flag = false flag false if (s_last != s_first) {
        flag = false;
      } s_last != s_first s_last s_first {
        flag = false;
      } flag = false flag false map.put(s, 1) map.put map s 1 s_last = s.charAt(s.length() - 1) s_last s.charAt(s.length() - 1) s.charAt s s.length() - 1 s.length() s.length s 1 if (flag) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    } flag {
      System.out.println("Yes");
    } System.out.println("Yes") System.out.println System.out System System.out "Yes" {
      System.out.println("No");
    } 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 sc = new Scanner(System.in);
    int n = sc.nextInt();
    HashMap<String, Integer> map = new HashMap<>();
    boolean flag = true;
    String s = sc.next();
    map.put(s, 1);
    char s_last = s.charAt(s.length() - 1);
    for (int i = 1; i < n; i++) {
      s = sc.next();
      char s_first = s.charAt(0);
      if (map.containsKey(s)) {
        flag = false;
      }
      if (s_last != s_first) {
        flag = false;
      }
      map.put(s, 1);
      s_last = s.charAt(s.length() - 1);
    }
    if (flag) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    HashMap<String, Integer> map = new HashMap<>();
    boolean flag = true;
    String s = sc.next();
    map.put(s, 1);
    char s_last = s.charAt(s.length() - 1);
    for (int i = 1; i < n; i++) {
      s = sc.next();
      char s_first = s.charAt(0);
      if (map.containsKey(s)) {
        flag = false;
      }
      if (s_last != s_first) {
        flag = false;
      }
      map.put(s, 1);
      s_last = s.charAt(s.length() - 1);
    }
    if (flag) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
  }
} Main
import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    HashMap<String, Integer> map = new HashMap<>();
    boolean flag = true;
    String s = sc.next();
    map.put(s, 1);
    char s_last = s.charAt(s.length() - 1);
    for (int i = 1; i < n; i++) {
      s = sc.next();
      char s_first = s.charAt(0);
      if (map.containsKey(s)) {
        flag = false;
      }
      if (s_last != s_first) {
        flag = false;
      }
      map.put(s, 1);
      s_last = s.charAt(s.length() - 1);
    }
    if (flag) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
  }
}