import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    try {
      boolean ans = true;
      String pre = "";
      HashMap<String, Integer> map = new HashMap<String, Integer>();
      int n = sc.nextInt();
      for (int i = 0; i < n; i++) {
        String s = sc.next();
        if (i > 0 && s.charAt(0) != pre.charAt(pre.length()-1)) {
          ans = false;
        }
        if (map.containsKey(s)) ans = false;
        map.put(s, 1);
        pre = s;

      }
      System.out.println(ans ? "Yes" : "No"); 
    } finally {
      sc.close();
    }
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    try {
      boolean ans = true;
      String pre = "";
      HashMap<String, Integer> map = new HashMap<String, Integer>();
      int n = sc.nextInt();
      for (int i = 0; i < n; i++) {
        String s = sc.next();
        if (i > 0 && s.charAt(0) != pre.charAt(pre.length()-1)) {
          ans = false;
        }
        if (map.containsKey(s)) ans = false;
        map.put(s, 1);
        pre = s;

      }
      System.out.println(ans ? "Yes" : "No"); 
    } finally {
      sc.close();
    }
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    try {
      boolean ans = true;
      String pre = "";
      HashMap<String, Integer> map = new HashMap<String, Integer>();
      int n = sc.nextInt();
      for (int i = 0; i < n; i++) {
        String s = sc.next();
        if (i > 0 && s.charAt(0) != pre.charAt(pre.length()-1)) {
          ans = false;
        }
        if (map.containsKey(s)) ans = false;
        map.put(s, 1);
        pre = s;

      }
      System.out.println(ans ? "Yes" : "No"); 
    } finally {
      sc.close();
    }
  } main {
    Scanner sc = new Scanner(System.in);
    try {
      boolean ans = true;
      String pre = "";
      HashMap<String, Integer> map = new HashMap<String, Integer>();
      int n = sc.nextInt();
      for (int i = 0; i < n; i++) {
        String s = sc.next();
        if (i > 0 && s.charAt(0) != pre.charAt(pre.length()-1)) {
          ans = false;
        }
        if (map.containsKey(s)) ans = false;
        map.put(s, 1);
        pre = s;

      }
      System.out.println(ans ? "Yes" : "No"); 
    } finally {
      sc.close();
    }
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) try {
      boolean ans = true;
      String pre = "";
      HashMap<String, Integer> map = new HashMap<String, Integer>();
      int n = sc.nextInt();
      for (int i = 0; i < n; i++) {
        String s = sc.next();
        if (i > 0 && s.charAt(0) != pre.charAt(pre.length()-1)) {
          ans = false;
        }
        if (map.containsKey(s)) ans = false;
        map.put(s, 1);
        pre = s;

      }
      System.out.println(ans ? "Yes" : "No"); 
    } finally {
      sc.close();
    } {
      sc.close();
    } sc.close() sc.close sc {
      boolean ans = true;
      String pre = "";
      HashMap<String, Integer> map = new HashMap<String, Integer>();
      int n = sc.nextInt();
      for (int i = 0; i < n; i++) {
        String s = sc.next();
        if (i > 0 && s.charAt(0) != pre.charAt(pre.length()-1)) {
          ans = false;
        }
        if (map.containsKey(s)) ans = false;
        map.put(s, 1);
        pre = s;

      }
      System.out.println(ans ? "Yes" : "No"); 
    } boolean ans = true; ans true String pre = ""; pre "" HashMap<String, Integer> map = new HashMap<String, Integer>(); map new HashMap<String, Integer>() int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc for (int i = 0; i < n; i++) {
        String s = sc.next();
        if (i > 0 && s.charAt(0) != pre.charAt(pre.length()-1)) {
          ans = false;
        }
        if (map.containsKey(s)) ans = false;
        map.put(s, 1);
        pre = s;

      } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
        String s = sc.next();
        if (i > 0 && s.charAt(0) != pre.charAt(pre.length()-1)) {
          ans = false;
        }
        if (map.containsKey(s)) ans = false;
        map.put(s, 1);
        pre = s;

      } {
        String s = sc.next();
        if (i > 0 && s.charAt(0) != pre.charAt(pre.length()-1)) {
          ans = false;
        }
        if (map.containsKey(s)) ans = false;
        map.put(s, 1);
        pre = s;

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

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

      }
      System.out.println(ans ? "Yes" : "No"); 
    } finally {
      sc.close();
    }
  }
} Main
import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    try {
      boolean ans = true;
      String pre = "";
      HashMap<String, Integer> map = new HashMap<String, Integer>();
      int n = sc.nextInt();
      for (int i = 0; i < n; i++) {
        String s = sc.next();
        if (i > 0 && s.charAt(0) != pre.charAt(pre.length()-1)) {
          ans = false;
        }
        if (map.containsKey(s)) ans = false;
        map.put(s, 1);
        pre = s;

      }
      System.out.println(ans ? "Yes" : "No"); 
    } finally {
      sc.close();
    }
  }
}
