import java.util.*;

public class Main {
  
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    Set<String> said = new HashSet<>();
    String w0 = sc.next();
    char nextHead = w0.charAt(w0.length()-1);
    said.add(w0);
    for (int i = 0; i < N-1; i++) {
      String w = sc.next();
      if (w.charAt(0) != nextHead || !said.add(w)) {
        System.out.println("No");
        return;
      }
      nextHead = w.charAt(w.length()-1);
    }
    System.out.println("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();
    Set<String> said = new HashSet<>();
    String w0 = sc.next();
    char nextHead = w0.charAt(w0.length()-1);
    said.add(w0);
    for (int i = 0; i < N-1; i++) {
      String w = sc.next();
      if (w.charAt(0) != nextHead || !said.add(w)) {
        System.out.println("No");
        return;
      }
      nextHead = w.charAt(w.length()-1);
    }
    System.out.println("Yes");
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    Set<String> said = new HashSet<>();
    String w0 = sc.next();
    char nextHead = w0.charAt(w0.length()-1);
    said.add(w0);
    for (int i = 0; i < N-1; i++) {
      String w = sc.next();
      if (w.charAt(0) != nextHead || !said.add(w)) {
        System.out.println("No");
        return;
      }
      nextHead = w.charAt(w.length()-1);
    }
    System.out.println("Yes");
  } main {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    Set<String> said = new HashSet<>();
    String w0 = sc.next();
    char nextHead = w0.charAt(w0.length()-1);
    said.add(w0);
    for (int i = 0; i < N-1; i++) {
      String w = sc.next();
      if (w.charAt(0) != nextHead || !said.add(w)) {
        System.out.println("No");
        return;
      }
      nextHead = w.charAt(w.length()-1);
    }
    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 Set<String> said = new HashSet<>(); said new HashSet<>() String w0 = sc.next(); w0 sc.next() sc.next sc char nextHead = w0.charAt(w0.length()-1); nextHead w0.charAt(w0.length()-1) w0.charAt w0 w0.length()-1 w0.length() w0.length w0 1 said.add(w0) said.add said w0 for (int i = 0; i < N-1; i++) {
      String w = sc.next();
      if (w.charAt(0) != nextHead || !said.add(w)) {
        System.out.println("No");
        return;
      }
      nextHead = w.charAt(w.length()-1);
    } int i = 0; int i = 0; i 0 i < N-1 i N-1 N 1 i++ i++ i {
      String w = sc.next();
      if (w.charAt(0) != nextHead || !said.add(w)) {
        System.out.println("No");
        return;
      }
      nextHead = w.charAt(w.length()-1);
    } {
      String w = sc.next();
      if (w.charAt(0) != nextHead || !said.add(w)) {
        System.out.println("No");
        return;
      }
      nextHead = w.charAt(w.length()-1);
    } String w = sc.next(); w sc.next() sc.next sc if (w.charAt(0) != nextHead || !said.add(w)) {
        System.out.println("No");
        return;
      } w.charAt(0) != nextHead || !said.add(w) w.charAt(0) != nextHead w.charAt(0) w.charAt w 0 nextHead !said.add(w) said.add(w) said.add said w {
        System.out.println("No");
        return;
      } System.out.println("No") System.out.println System.out System System.out "No" return; nextHead = w.charAt(w.length()-1) nextHead w.charAt(w.length()-1) w.charAt w w.length()-1 w.length() w.length w 1 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();
    Set<String> said = new HashSet<>();
    String w0 = sc.next();
    char nextHead = w0.charAt(w0.length()-1);
    said.add(w0);
    for (int i = 0; i < N-1; i++) {
      String w = sc.next();
      if (w.charAt(0) != nextHead || !said.add(w)) {
        System.out.println("No");
        return;
      }
      nextHead = w.charAt(w.length()-1);
    }
    System.out.println("Yes");
  }
} public class Main {
  
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    Set<String> said = new HashSet<>();
    String w0 = sc.next();
    char nextHead = w0.charAt(w0.length()-1);
    said.add(w0);
    for (int i = 0; i < N-1; i++) {
      String w = sc.next();
      if (w.charAt(0) != nextHead || !said.add(w)) {
        System.out.println("No");
        return;
      }
      nextHead = w.charAt(w.length()-1);
    }
    System.out.println("Yes");
  }
} Main
import java.util.*;

public class Main {
  
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    Set<String> said = new HashSet<>();
    String w0 = sc.next();
    char nextHead = w0.charAt(w0.length()-1);
    said.add(w0);
    for (int i = 0; i < N-1; i++) {
      String w = sc.next();
      if (w.charAt(0) != nextHead || !said.add(w)) {
        System.out.println("No");
        return;
      }
      nextHead = w.charAt(w.length()-1);
    }
    System.out.println("Yes");
  }
}