import java.util.*;

public class Main {
	public static void main(String[] args) {
      Scanner sc =new Scanner(System.in);
      int N = sc.nextInt();
      int check =0;
      String[] W = new String[N];
	  for (int i=0; i<N; i++) {
        W[i] = sc.next();
      }
      for (int i=0; i<N-1; i++) {
        if (W[i].charAt(W[i].length()-1) != W[i+1].charAt(0)) {
          check++;
          break;
        }
        for (int j=i+1; j<N; j++) {
          if (W[i].equals(W[j])) {
            check++;
            break;
          }
        }
      }
      if (check != 0) {
        System.out.print("No");
      } else {
        System.out.print("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();
      int check =0;
      String[] W = new String[N];
	  for (int i=0; i<N; i++) {
        W[i] = sc.next();
      }
      for (int i=0; i<N-1; i++) {
        if (W[i].charAt(W[i].length()-1) != W[i+1].charAt(0)) {
          check++;
          break;
        }
        for (int j=i+1; j<N; j++) {
          if (W[i].equals(W[j])) {
            check++;
            break;
          }
        }
      }
      if (check != 0) {
        System.out.print("No");
      } else {
        System.out.print("Yes");
      }
    }
} Main public static void main(String[] args) {
      Scanner sc =new Scanner(System.in);
      int N = sc.nextInt();
      int check =0;
      String[] W = new String[N];
	  for (int i=0; i<N; i++) {
        W[i] = sc.next();
      }
      for (int i=0; i<N-1; i++) {
        if (W[i].charAt(W[i].length()-1) != W[i+1].charAt(0)) {
          check++;
          break;
        }
        for (int j=i+1; j<N; j++) {
          if (W[i].equals(W[j])) {
            check++;
            break;
          }
        }
      }
      if (check != 0) {
        System.out.print("No");
      } else {
        System.out.print("Yes");
      }
    } main {
      Scanner sc =new Scanner(System.in);
      int N = sc.nextInt();
      int check =0;
      String[] W = new String[N];
	  for (int i=0; i<N; i++) {
        W[i] = sc.next();
      }
      for (int i=0; i<N-1; i++) {
        if (W[i].charAt(W[i].length()-1) != W[i+1].charAt(0)) {
          check++;
          break;
        }
        for (int j=i+1; j<N; j++) {
          if (W[i].equals(W[j])) {
            check++;
            break;
          }
        }
      }
      if (check != 0) {
        System.out.print("No");
      } else {
        System.out.print("Yes");
      }
    } Scanner sc =new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int check =0; check 0 String[] W = new String[N]; W new String[N] N for (int i=0; i<N; i++) {
        W[i] = sc.next();
      } int i=0; int i=0; i 0 i<N i N i++ i++ i {
        W[i] = sc.next();
      } {
        W[i] = sc.next();
      } W[i] = sc.next() W[i] W i sc.next() sc.next sc for (int i=0; i<N-1; i++) {
        if (W[i].charAt(W[i].length()-1) != W[i+1].charAt(0)) {
          check++;
          break;
        }
        for (int j=i+1; j<N; j++) {
          if (W[i].equals(W[j])) {
            check++;
            break;
          }
        }
      } int i=0; int i=0; i 0 i<N-1 i N-1 N 1 i++ i++ i {
        if (W[i].charAt(W[i].length()-1) != W[i+1].charAt(0)) {
          check++;
          break;
        }
        for (int j=i+1; j<N; j++) {
          if (W[i].equals(W[j])) {
            check++;
            break;
          }
        }
      } {
        if (W[i].charAt(W[i].length()-1) != W[i+1].charAt(0)) {
          check++;
          break;
        }
        for (int j=i+1; j<N; j++) {
          if (W[i].equals(W[j])) {
            check++;
            break;
          }
        }
      } if (W[i].charAt(W[i].length()-1) != W[i+1].charAt(0)) {
          check++;
          break;
        } W[i].charAt(W[i].length()-1) != W[i+1].charAt(0) W[i].charAt(W[i].length()-1) W[i].charAt W[i] W i W[i].length()-1 W[i].length() W[i].length W[i] W i 1 W[i+1].charAt(0) W[i+1].charAt W[i+1] W i+1 i 1 0 {
          check++;
          break;
        } check++ check break; for (int j=i+1; j<N; j++) {
          if (W[i].equals(W[j])) {
            check++;
            break;
          }
        } int j=i+1; int j=i+1; j i+1 i 1 j<N j N j++ j++ j {
          if (W[i].equals(W[j])) {
            check++;
            break;
          }
        } {
          if (W[i].equals(W[j])) {
            check++;
            break;
          }
        } if (W[i].equals(W[j])) {
            check++;
            break;
          } W[i].equals(W[j]) W[i].equals W[i] W i W[j] W j {
            check++;
            break;
          } check++ check break; if (check != 0) {
        System.out.print("No");
      } else {
        System.out.print("Yes");
      } check != 0 check 0 {
        System.out.print("No");
      } System.out.print("No") System.out.print System.out System System.out "No" {
        System.out.print("Yes");
      } System.out.print("Yes") System.out.print 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();
      int check =0;
      String[] W = new String[N];
	  for (int i=0; i<N; i++) {
        W[i] = sc.next();
      }
      for (int i=0; i<N-1; i++) {
        if (W[i].charAt(W[i].length()-1) != W[i+1].charAt(0)) {
          check++;
          break;
        }
        for (int j=i+1; j<N; j++) {
          if (W[i].equals(W[j])) {
            check++;
            break;
          }
        }
      }
      if (check != 0) {
        System.out.print("No");
      } else {
        System.out.print("Yes");
      }
    }
} public class Main {
	public static void main(String[] args) {
      Scanner sc =new Scanner(System.in);
      int N = sc.nextInt();
      int check =0;
      String[] W = new String[N];
	  for (int i=0; i<N; i++) {
        W[i] = sc.next();
      }
      for (int i=0; i<N-1; i++) {
        if (W[i].charAt(W[i].length()-1) != W[i+1].charAt(0)) {
          check++;
          break;
        }
        for (int j=i+1; j<N; j++) {
          if (W[i].equals(W[j])) {
            check++;
            break;
          }
        }
      }
      if (check != 0) {
        System.out.print("No");
      } else {
        System.out.print("Yes");
      }
    }
} Main
import java.util.*;

public class Main {
	public static void main(String[] args) {
      Scanner sc =new Scanner(System.in);
      int N = sc.nextInt();
      int check =0;
      String[] W = new String[N];
	  for (int i=0; i<N; i++) {
        W[i] = sc.next();
      }
      for (int i=0; i<N-1; i++) {
        if (W[i].charAt(W[i].length()-1) != W[i+1].charAt(0)) {
          check++;
          break;
        }
        for (int j=i+1; j<N; j++) {
          if (W[i].equals(W[j])) {
            check++;
            break;
          }
        }
      }
      if (check != 0) {
        System.out.print("No");
      } else {
        System.out.print("Yes");
      }
    }
}