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