
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();

		Set<String>used=new HashSet<String>();

		String s = sc.next();
		used.add(s);
		for (int i = 1; i < N; i++) {
			String t = sc.next();
			if (used.contains(t)) {
				System.out.println("No");
				break;
			}else {
				used.add(t);
			}
			if (s.charAt(s.length()-1) != t.charAt(0)) {
				System.out.println("No");
				break;
			}
			if (i == N-1) {
				System.out.println("Yes");
			}
			s=t;
		}

	}
}
 import java.util.HashSet; HashSet java.util import java.util.Scanner; Scanner java.util import java.util.Set; Set java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();

		Set<String>used=new HashSet<String>();

		String s = sc.next();
		used.add(s);
		for (int i = 1; i < N; i++) {
			String t = sc.next();
			if (used.contains(t)) {
				System.out.println("No");
				break;
			}else {
				used.add(t);
			}
			if (s.charAt(s.length()-1) != t.charAt(0)) {
				System.out.println("No");
				break;
			}
			if (i == N-1) {
				System.out.println("Yes");
			}
			s=t;
		}

	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();

		Set<String>used=new HashSet<String>();

		String s = sc.next();
		used.add(s);
		for (int i = 1; i < N; i++) {
			String t = sc.next();
			if (used.contains(t)) {
				System.out.println("No");
				break;
			}else {
				used.add(t);
			}
			if (s.charAt(s.length()-1) != t.charAt(0)) {
				System.out.println("No");
				break;
			}
			if (i == N-1) {
				System.out.println("Yes");
			}
			s=t;
		}

	} main {
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();

		Set<String>used=new HashSet<String>();

		String s = sc.next();
		used.add(s);
		for (int i = 1; i < N; i++) {
			String t = sc.next();
			if (used.contains(t)) {
				System.out.println("No");
				break;
			}else {
				used.add(t);
			}
			if (s.charAt(s.length()-1) != t.charAt(0)) {
				System.out.println("No");
				break;
			}
			if (i == N-1) {
				System.out.println("Yes");
			}
			s=t;
		}

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc Set<String>used=new HashSet<String>(); used new HashSet<String>() String s = sc.next(); s sc.next() sc.next sc used.add(s) used.add used s for (int i = 1; i < N; i++) {
			String t = sc.next();
			if (used.contains(t)) {
				System.out.println("No");
				break;
			}else {
				used.add(t);
			}
			if (s.charAt(s.length()-1) != t.charAt(0)) {
				System.out.println("No");
				break;
			}
			if (i == N-1) {
				System.out.println("Yes");
			}
			s=t;
		} int i = 1; int i = 1; i 1 i < N i N i++ i++ i {
			String t = sc.next();
			if (used.contains(t)) {
				System.out.println("No");
				break;
			}else {
				used.add(t);
			}
			if (s.charAt(s.length()-1) != t.charAt(0)) {
				System.out.println("No");
				break;
			}
			if (i == N-1) {
				System.out.println("Yes");
			}
			s=t;
		} {
			String t = sc.next();
			if (used.contains(t)) {
				System.out.println("No");
				break;
			}else {
				used.add(t);
			}
			if (s.charAt(s.length()-1) != t.charAt(0)) {
				System.out.println("No");
				break;
			}
			if (i == N-1) {
				System.out.println("Yes");
			}
			s=t;
		} String t = sc.next(); t sc.next() sc.next sc if (used.contains(t)) {
				System.out.println("No");
				break;
			}else {
				used.add(t);
			} used.contains(t) used.contains used t {
				System.out.println("No");
				break;
			} System.out.println("No") System.out.println System.out System System.out "No" break; {
				used.add(t);
			} used.add(t) used.add used t if (s.charAt(s.length()-1) != t.charAt(0)) {
				System.out.println("No");
				break;
			} s.charAt(s.length()-1) != t.charAt(0) s.charAt(s.length()-1) s.charAt s s.length()-1 s.length() s.length s 1 t.charAt(0) t.charAt t 0 {
				System.out.println("No");
				break;
			} System.out.println("No") System.out.println System.out System System.out "No" break; if (i == N-1) {
				System.out.println("Yes");
			} i == N-1 i N-1 N 1 {
				System.out.println("Yes");
			} System.out.println("Yes") System.out.println System.out System System.out "Yes" s=t s t String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();

		Set<String>used=new HashSet<String>();

		String s = sc.next();
		used.add(s);
		for (int i = 1; i < N; i++) {
			String t = sc.next();
			if (used.contains(t)) {
				System.out.println("No");
				break;
			}else {
				used.add(t);
			}
			if (s.charAt(s.length()-1) != t.charAt(0)) {
				System.out.println("No");
				break;
			}
			if (i == N-1) {
				System.out.println("Yes");
			}
			s=t;
		}

	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();

		Set<String>used=new HashSet<String>();

		String s = sc.next();
		used.add(s);
		for (int i = 1; i < N; i++) {
			String t = sc.next();
			if (used.contains(t)) {
				System.out.println("No");
				break;
			}else {
				used.add(t);
			}
			if (s.charAt(s.length()-1) != t.charAt(0)) {
				System.out.println("No");
				break;
			}
			if (i == N-1) {
				System.out.println("Yes");
			}
			s=t;
		}

	}
} Main

import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();

		Set<String>used=new HashSet<String>();

		String s = sc.next();
		used.add(s);
		for (int i = 1; i < N; i++) {
			String t = sc.next();
			if (used.contains(t)) {
				System.out.println("No");
				break;
			}else {
				used.add(t);
			}
			if (s.charAt(s.length()-1) != t.charAt(0)) {
				System.out.println("No");
				break;
			}
			if (i == N-1) {
				System.out.println("Yes");
			}
			s=t;
		}

	}
}

