import java.util.ArrayList;
import java.util.Scanner;

public class Main {

  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);

    int n = sc.nextInt();
    ArrayList<String> list = new ArrayList<String>();
    list.add(sc.next());

    for (int i = 1; i < n; i++) {
      String pre = list.get(i - 1);
      String s = sc.next();
      if (list.contains(s) || (s.charAt(0) != pre.charAt(pre.length() - 1))) {
        System.out.println("No");
        return;
      } else {
        list.add(s);
      }
    }

    System.out.println("Yes");

  }
} import java.util.ArrayList; ArrayList java.util 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();
    ArrayList<String> list = new ArrayList<String>();
    list.add(sc.next());

    for (int i = 1; i < n; i++) {
      String pre = list.get(i - 1);
      String s = sc.next();
      if (list.contains(s) || (s.charAt(0) != pre.charAt(pre.length() - 1))) {
        System.out.println("No");
        return;
      } else {
        list.add(s);
      }
    }

    System.out.println("Yes");

  }
} Main public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);

    int n = sc.nextInt();
    ArrayList<String> list = new ArrayList<String>();
    list.add(sc.next());

    for (int i = 1; i < n; i++) {
      String pre = list.get(i - 1);
      String s = sc.next();
      if (list.contains(s) || (s.charAt(0) != pre.charAt(pre.length() - 1))) {
        System.out.println("No");
        return;
      } else {
        list.add(s);
      }
    }

    System.out.println("Yes");

  } main {

    Scanner sc = new Scanner(System.in);

    int n = sc.nextInt();
    ArrayList<String> list = new ArrayList<String>();
    list.add(sc.next());

    for (int i = 1; i < n; i++) {
      String pre = list.get(i - 1);
      String s = sc.next();
      if (list.contains(s) || (s.charAt(0) != pre.charAt(pre.length() - 1))) {
        System.out.println("No");
        return;
      } else {
        list.add(s);
      }
    }

    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 ArrayList<String> list = new ArrayList<String>(); list new ArrayList<String>() list.add(sc.next()) list.add list sc.next() sc.next sc for (int i = 1; i < n; i++) {
      String pre = list.get(i - 1);
      String s = sc.next();
      if (list.contains(s) || (s.charAt(0) != pre.charAt(pre.length() - 1))) {
        System.out.println("No");
        return;
      } else {
        list.add(s);
      }
    } int i = 1; int i = 1; i 1 i < n i n i++ i++ i {
      String pre = list.get(i - 1);
      String s = sc.next();
      if (list.contains(s) || (s.charAt(0) != pre.charAt(pre.length() - 1))) {
        System.out.println("No");
        return;
      } else {
        list.add(s);
      }
    } {
      String pre = list.get(i - 1);
      String s = sc.next();
      if (list.contains(s) || (s.charAt(0) != pre.charAt(pre.length() - 1))) {
        System.out.println("No");
        return;
      } else {
        list.add(s);
      }
    } String pre = list.get(i - 1); pre list.get(i - 1) list.get list i - 1 i 1 String s = sc.next(); s sc.next() sc.next sc if (list.contains(s) || (s.charAt(0) != pre.charAt(pre.length() - 1))) {
        System.out.println("No");
        return;
      } else {
        list.add(s);
      } list.contains(s) || (s.charAt(0) != pre.charAt(pre.length() - 1)) list.contains(s) list.contains list s (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 {
        System.out.println("No");
        return;
      } System.out.println("No") System.out.println System.out System System.out "No" return; {
        list.add(s);
      } list.add(s) list.add list s 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();
    ArrayList<String> list = new ArrayList<String>();
    list.add(sc.next());

    for (int i = 1; i < n; i++) {
      String pre = list.get(i - 1);
      String s = sc.next();
      if (list.contains(s) || (s.charAt(0) != pre.charAt(pre.length() - 1))) {
        System.out.println("No");
        return;
      } else {
        list.add(s);
      }
    }

    System.out.println("Yes");

  }
} public class Main {

  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);

    int n = sc.nextInt();
    ArrayList<String> list = new ArrayList<String>();
    list.add(sc.next());

    for (int i = 1; i < n; i++) {
      String pre = list.get(i - 1);
      String s = sc.next();
      if (list.contains(s) || (s.charAt(0) != pre.charAt(pre.length() - 1))) {
        System.out.println("No");
        return;
      } else {
        list.add(s);
      }
    }

    System.out.println("Yes");

  }
} Main
import java.util.ArrayList;
import java.util.Scanner;

public class Main {

  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);

    int n = sc.nextInt();
    ArrayList<String> list = new ArrayList<String>();
    list.add(sc.next());

    for (int i = 1; i < n; i++) {
      String pre = list.get(i - 1);
      String s = sc.next();
      if (list.contains(s) || (s.charAt(0) != pre.charAt(pre.length() - 1))) {
        System.out.println("No");
        return;
      } else {
        list.add(s);
      }
    }

    System.out.println("Yes");

  }
}