import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String pre = "";
		String str = "";
		String ans = "Yes";

		for (int i = 0; i < n; i++) {
			str = sc.next();
			if (i > 0 && (!pre.substring(pre.length() - 2, pre.length() - 1).equals(str.substring(0, 1))
					|| pre.contains("*" + str + "*"))) {
				ans = "No";
			} else {
				pre += "*" + str + "*";
			}
		}

		System.out.println(ans);
		sc.close();
	}

} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String pre = "";
		String str = "";
		String ans = "Yes";

		for (int i = 0; i < n; i++) {
			str = sc.next();
			if (i > 0 && (!pre.substring(pre.length() - 2, pre.length() - 1).equals(str.substring(0, 1))
					|| pre.contains("*" + str + "*"))) {
				ans = "No";
			} else {
				pre += "*" + str + "*";
			}
		}

		System.out.println(ans);
		sc.close();
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String pre = "";
		String str = "";
		String ans = "Yes";

		for (int i = 0; i < n; i++) {
			str = sc.next();
			if (i > 0 && (!pre.substring(pre.length() - 2, pre.length() - 1).equals(str.substring(0, 1))
					|| pre.contains("*" + str + "*"))) {
				ans = "No";
			} else {
				pre += "*" + str + "*";
			}
		}

		System.out.println(ans);
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String pre = "";
		String str = "";
		String ans = "Yes";

		for (int i = 0; i < n; i++) {
			str = sc.next();
			if (i > 0 && (!pre.substring(pre.length() - 2, pre.length() - 1).equals(str.substring(0, 1))
					|| pre.contains("*" + str + "*"))) {
				ans = "No";
			} else {
				pre += "*" + str + "*";
			}
		}

		System.out.println(ans);
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc String pre = ""; pre "" String str = ""; str "" String ans = "Yes"; ans "Yes" for (int i = 0; i < n; i++) {
			str = sc.next();
			if (i > 0 && (!pre.substring(pre.length() - 2, pre.length() - 1).equals(str.substring(0, 1))
					|| pre.contains("*" + str + "*"))) {
				ans = "No";
			} else {
				pre += "*" + str + "*";
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			str = sc.next();
			if (i > 0 && (!pre.substring(pre.length() - 2, pre.length() - 1).equals(str.substring(0, 1))
					|| pre.contains("*" + str + "*"))) {
				ans = "No";
			} else {
				pre += "*" + str + "*";
			}
		} {
			str = sc.next();
			if (i > 0 && (!pre.substring(pre.length() - 2, pre.length() - 1).equals(str.substring(0, 1))
					|| pre.contains("*" + str + "*"))) {
				ans = "No";
			} else {
				pre += "*" + str + "*";
			}
		} str = sc.next() str sc.next() sc.next sc if (i > 0 && (!pre.substring(pre.length() - 2, pre.length() - 1).equals(str.substring(0, 1))
					|| pre.contains("*" + str + "*"))) {
				ans = "No";
			} else {
				pre += "*" + str + "*";
			} i > 0 && (!pre.substring(pre.length() - 2, pre.length() - 1).equals(str.substring(0, 1))
					|| pre.contains("*" + str + "*")) i > 0 i 0 (!pre.substring(pre.length() - 2, pre.length() - 1).equals(str.substring(0, 1))
					|| pre.contains("*" + str + "*")) !pre.substring(pre.length() - 2, pre.length() - 1).equals(str.substring(0, 1)) pre.substring(pre.length() - 2, pre.length() - 1).equals(str.substring(0, 1)) pre.substring(pre.length() - 2, pre.length() - 1).equals pre.substring(pre.length() - 2, pre.length() - 1) pre.substring pre pre.length() - 2 pre.length() pre.length pre 2 pre.length() - 1 pre.length() pre.length pre 1 str.substring(0, 1) str.substring str 0 1 pre.contains("*" + str + "*") pre.contains pre "*" + str + "*" "*" + str + "*" "*" str "*" {
				ans = "No";
			} ans = "No" ans "No" {
				pre += "*" + str + "*";
			} pre += "*" + str + "*" pre "*" + str + "*" "*" + str + "*" "*" str "*" System.out.println(ans) System.out.println System.out System System.out ans sc.close() sc.close sc String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String pre = "";
		String str = "";
		String ans = "Yes";

		for (int i = 0; i < n; i++) {
			str = sc.next();
			if (i > 0 && (!pre.substring(pre.length() - 2, pre.length() - 1).equals(str.substring(0, 1))
					|| pre.contains("*" + str + "*"))) {
				ans = "No";
			} else {
				pre += "*" + str + "*";
			}
		}

		System.out.println(ans);
		sc.close();
	}

} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String pre = "";
		String str = "";
		String ans = "Yes";

		for (int i = 0; i < n; i++) {
			str = sc.next();
			if (i > 0 && (!pre.substring(pre.length() - 2, pre.length() - 1).equals(str.substring(0, 1))
					|| pre.contains("*" + str + "*"))) {
				ans = "No";
			} else {
				pre += "*" + str + "*";
			}
		}

		System.out.println(ans);
		sc.close();
	}

} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String pre = "";
		String str = "";
		String ans = "Yes";

		for (int i = 0; i < n; i++) {
			str = sc.next();
			if (i > 0 && (!pre.substring(pre.length() - 2, pre.length() - 1).equals(str.substring(0, 1))
					|| pre.contains("*" + str + "*"))) {
				ans = "No";
			} else {
				pre += "*" + str + "*";
			}
		}

		System.out.println(ans);
		sc.close();
	}

}
