import java.util.*;

public class Main {
	public static long MOD = 1000000007l;

	public static void main(String[] arg) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String[] a = new String[n];
		for (int i = 0; i < n; i++) {
			a[i] = sc.next();
		}
		sc.close();
		char first = a[0].charAt(a[0].length() - 1);
		boolean ans = true;
		for (int i = 1; i < n; i++) {
			if (!(first == a[i].charAt(0))) {
				ans = false;
				break;
			} else {
				// System.out.println(first);
				first = a[i].charAt(a[i].length() - 1);
				// System.out.println(first);
			}
		}
		if (ans) {
			Arrays.sort(a);
			String prev = a[0];
			for (int i = 1; i < n; i++) {
				if (prev.equals(a[i])) {
					ans = false;
					break;
				} else {
					prev = a[i];
				}
			}
		}
		System.out.println(ans ? "Yes" : "No");
	}
} import java.util.*; util.* java public class Main {
	public static long MOD = 1000000007l;

	public static void main(String[] arg) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String[] a = new String[n];
		for (int i = 0; i < n; i++) {
			a[i] = sc.next();
		}
		sc.close();
		char first = a[0].charAt(a[0].length() - 1);
		boolean ans = true;
		for (int i = 1; i < n; i++) {
			if (!(first == a[i].charAt(0))) {
				ans = false;
				break;
			} else {
				// System.out.println(first);
				first = a[i].charAt(a[i].length() - 1);
				// System.out.println(first);
			}
		}
		if (ans) {
			Arrays.sort(a);
			String prev = a[0];
			for (int i = 1; i < n; i++) {
				if (prev.equals(a[i])) {
					ans = false;
					break;
				} else {
					prev = a[i];
				}
			}
		}
		System.out.println(ans ? "Yes" : "No");
	}
} Main public static long MOD = 1000000007l; MOD 1000000007l public static void main(String[] arg) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String[] a = new String[n];
		for (int i = 0; i < n; i++) {
			a[i] = sc.next();
		}
		sc.close();
		char first = a[0].charAt(a[0].length() - 1);
		boolean ans = true;
		for (int i = 1; i < n; i++) {
			if (!(first == a[i].charAt(0))) {
				ans = false;
				break;
			} else {
				// System.out.println(first);
				first = a[i].charAt(a[i].length() - 1);
				// System.out.println(first);
			}
		}
		if (ans) {
			Arrays.sort(a);
			String prev = a[0];
			for (int i = 1; i < n; i++) {
				if (prev.equals(a[i])) {
					ans = false;
					break;
				} else {
					prev = a[i];
				}
			}
		}
		System.out.println(ans ? "Yes" : "No");
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String[] a = new String[n];
		for (int i = 0; i < n; i++) {
			a[i] = sc.next();
		}
		sc.close();
		char first = a[0].charAt(a[0].length() - 1);
		boolean ans = true;
		for (int i = 1; i < n; i++) {
			if (!(first == a[i].charAt(0))) {
				ans = false;
				break;
			} else {
				// System.out.println(first);
				first = a[i].charAt(a[i].length() - 1);
				// System.out.println(first);
			}
		}
		if (ans) {
			Arrays.sort(a);
			String prev = a[0];
			for (int i = 1; i < n; i++) {
				if (prev.equals(a[i])) {
					ans = false;
					break;
				} else {
					prev = a[i];
				}
			}
		}
		System.out.println(ans ? "Yes" : "No");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc String[] a = new String[n]; a new String[n] n for (int i = 0; i < n; i++) {
			a[i] = sc.next();
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			a[i] = sc.next();
		} {
			a[i] = sc.next();
		} a[i] = sc.next() a[i] a i sc.next() sc.next sc sc.close() sc.close sc char first = a[0].charAt(a[0].length() - 1); first a[0].charAt(a[0].length() - 1) a[0].charAt a[0] a 0 a[0].length() - 1 a[0].length() a[0].length a[0] a 0 1 boolean ans = true; ans true for (int i = 1; i < n; i++) {
			if (!(first == a[i].charAt(0))) {
				ans = false;
				break;
			} else {
				// System.out.println(first);
				first = a[i].charAt(a[i].length() - 1);
				// System.out.println(first);
			}
		} int i = 1; int i = 1; i 1 i < n i n i++ i++ i {
			if (!(first == a[i].charAt(0))) {
				ans = false;
				break;
			} else {
				// System.out.println(first);
				first = a[i].charAt(a[i].length() - 1);
				// System.out.println(first);
			}
		} {
			if (!(first == a[i].charAt(0))) {
				ans = false;
				break;
			} else {
				// System.out.println(first);
				first = a[i].charAt(a[i].length() - 1);
				// System.out.println(first);
			}
		} if (!(first == a[i].charAt(0))) {
				ans = false;
				break;
			} else {
				// System.out.println(first);
				first = a[i].charAt(a[i].length() - 1);
				// System.out.println(first);
			} !(first == a[i].charAt(0)) (first == a[i].charAt(0)) first a[i].charAt(0) a[i].charAt a[i] a i 0 {
				ans = false;
				break;
			} ans = false ans false break; {
				// System.out.println(first);
				first = a[i].charAt(a[i].length() - 1);
				// System.out.println(first);
			} first = a[i].charAt(a[i].length() - 1) first a[i].charAt(a[i].length() - 1) a[i].charAt a[i] a i a[i].length() - 1 a[i].length() a[i].length a[i] a i 1 if (ans) {
			Arrays.sort(a);
			String prev = a[0];
			for (int i = 1; i < n; i++) {
				if (prev.equals(a[i])) {
					ans = false;
					break;
				} else {
					prev = a[i];
				}
			}
		} ans {
			Arrays.sort(a);
			String prev = a[0];
			for (int i = 1; i < n; i++) {
				if (prev.equals(a[i])) {
					ans = false;
					break;
				} else {
					prev = a[i];
				}
			}
		} Arrays.sort(a) Arrays.sort Arrays a String prev = a[0]; prev a[0] a 0 for (int i = 1; i < n; i++) {
				if (prev.equals(a[i])) {
					ans = false;
					break;
				} else {
					prev = a[i];
				}
			} int i = 1; int i = 1; i 1 i < n i n i++ i++ i {
				if (prev.equals(a[i])) {
					ans = false;
					break;
				} else {
					prev = a[i];
				}
			} {
				if (prev.equals(a[i])) {
					ans = false;
					break;
				} else {
					prev = a[i];
				}
			} if (prev.equals(a[i])) {
					ans = false;
					break;
				} else {
					prev = a[i];
				} prev.equals(a[i]) prev.equals prev a[i] a i {
					ans = false;
					break;
				} ans = false ans false break; {
					prev = a[i];
				} prev = a[i] prev a[i] a i System.out.println(ans ? "Yes" : "No") System.out.println System.out System System.out ans ? "Yes" : "No" ans "Yes" "No" String[] arg arg public class Main {
	public static long MOD = 1000000007l;

	public static void main(String[] arg) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String[] a = new String[n];
		for (int i = 0; i < n; i++) {
			a[i] = sc.next();
		}
		sc.close();
		char first = a[0].charAt(a[0].length() - 1);
		boolean ans = true;
		for (int i = 1; i < n; i++) {
			if (!(first == a[i].charAt(0))) {
				ans = false;
				break;
			} else {
				// System.out.println(first);
				first = a[i].charAt(a[i].length() - 1);
				// System.out.println(first);
			}
		}
		if (ans) {
			Arrays.sort(a);
			String prev = a[0];
			for (int i = 1; i < n; i++) {
				if (prev.equals(a[i])) {
					ans = false;
					break;
				} else {
					prev = a[i];
				}
			}
		}
		System.out.println(ans ? "Yes" : "No");
	}
} public class Main {
	public static long MOD = 1000000007l;

	public static void main(String[] arg) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String[] a = new String[n];
		for (int i = 0; i < n; i++) {
			a[i] = sc.next();
		}
		sc.close();
		char first = a[0].charAt(a[0].length() - 1);
		boolean ans = true;
		for (int i = 1; i < n; i++) {
			if (!(first == a[i].charAt(0))) {
				ans = false;
				break;
			} else {
				// System.out.println(first);
				first = a[i].charAt(a[i].length() - 1);
				// System.out.println(first);
			}
		}
		if (ans) {
			Arrays.sort(a);
			String prev = a[0];
			for (int i = 1; i < n; i++) {
				if (prev.equals(a[i])) {
					ans = false;
					break;
				} else {
					prev = a[i];
				}
			}
		}
		System.out.println(ans ? "Yes" : "No");
	}
} Main
import java.util.*;

public class Main {
	public static long MOD = 1000000007l;

	public static void main(String[] arg) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String[] a = new String[n];
		for (int i = 0; i < n; i++) {
			a[i] = sc.next();
		}
		sc.close();
		char first = a[0].charAt(a[0].length() - 1);
		boolean ans = true;
		for (int i = 1; i < n; i++) {
			if (!(first == a[i].charAt(0))) {
				ans = false;
				break;
			} else {
				// System.out.println(first);
				first = a[i].charAt(a[i].length() - 1);
				// System.out.println(first);
			}
		}
		if (ans) {
			Arrays.sort(a);
			String prev = a[0];
			for (int i = 1; i < n; i++) {
				if (prev.equals(a[i])) {
					ans = false;
					break;
				} else {
					prev = a[i];
				}
			}
		}
		System.out.println(ans ? "Yes" : "No");
	}
}
