import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int length = sc.nextInt();
		sc.nextLine();
		String[] array = new String[length];
		for (int i = 0; i < length; i++) {
			//System.out.println(i);
			array[i] = sc.nextLine();
			//System.out.println(array[i]);
			if (i == 0) {
				continue;
			}

			//デバッグ用メソッド
			//System.out.println(i);

			//System.out.println(array[i].substring(0, 1));
			//System.out.println(array[i - 1].length() - 1);

			if (!(array[i].substring(0, 1)).equals(array[i - 1].substring(array[i - 1].length() - 1))) {
				System.out.println("No");
				return;
			}
		}
		//uniqueチェック
		for (int i = 0; i < length - 1; i++) {
			for (int j = i + 1; j < length; j++) {
				if (array[i].equals(array[j])) {
					System.out.println("No");
					return;
				}
			}
		}
		System.out.println("Yes");
	}

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int length = sc.nextInt();
		sc.nextLine();
		String[] array = new String[length];
		for (int i = 0; i < length; i++) {
			//System.out.println(i);
			array[i] = sc.nextLine();
			//System.out.println(array[i]);
			if (i == 0) {
				continue;
			}

			//デバッグ用メソッド
			//System.out.println(i);

			//System.out.println(array[i].substring(0, 1));
			//System.out.println(array[i - 1].length() - 1);

			if (!(array[i].substring(0, 1)).equals(array[i - 1].substring(array[i - 1].length() - 1))) {
				System.out.println("No");
				return;
			}
		}
		//uniqueチェック
		for (int i = 0; i < length - 1; i++) {
			for (int j = i + 1; j < length; j++) {
				if (array[i].equals(array[j])) {
					System.out.println("No");
					return;
				}
			}
		}
		System.out.println("Yes");
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int length = sc.nextInt();
		sc.nextLine();
		String[] array = new String[length];
		for (int i = 0; i < length; i++) {
			//System.out.println(i);
			array[i] = sc.nextLine();
			//System.out.println(array[i]);
			if (i == 0) {
				continue;
			}

			//デバッグ用メソッド
			//System.out.println(i);

			//System.out.println(array[i].substring(0, 1));
			//System.out.println(array[i - 1].length() - 1);

			if (!(array[i].substring(0, 1)).equals(array[i - 1].substring(array[i - 1].length() - 1))) {
				System.out.println("No");
				return;
			}
		}
		//uniqueチェック
		for (int i = 0; i < length - 1; i++) {
			for (int j = i + 1; j < length; j++) {
				if (array[i].equals(array[j])) {
					System.out.println("No");
					return;
				}
			}
		}
		System.out.println("Yes");
	} main {
		Scanner sc = new Scanner(System.in);
		int length = sc.nextInt();
		sc.nextLine();
		String[] array = new String[length];
		for (int i = 0; i < length; i++) {
			//System.out.println(i);
			array[i] = sc.nextLine();
			//System.out.println(array[i]);
			if (i == 0) {
				continue;
			}

			//デバッグ用メソッド
			//System.out.println(i);

			//System.out.println(array[i].substring(0, 1));
			//System.out.println(array[i - 1].length() - 1);

			if (!(array[i].substring(0, 1)).equals(array[i - 1].substring(array[i - 1].length() - 1))) {
				System.out.println("No");
				return;
			}
		}
		//uniqueチェック
		for (int i = 0; i < length - 1; i++) {
			for (int j = i + 1; j < length; j++) {
				if (array[i].equals(array[j])) {
					System.out.println("No");
					return;
				}
			}
		}
		System.out.println("Yes");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int length = sc.nextInt(); length sc.nextInt() sc.nextInt sc sc.nextLine() sc.nextLine sc String[] array = new String[length]; array new String[length] length for (int i = 0; i < length; i++) {
			//System.out.println(i);
			array[i] = sc.nextLine();
			//System.out.println(array[i]);
			if (i == 0) {
				continue;
			}

			//デバッグ用メソッド
			//System.out.println(i);

			//System.out.println(array[i].substring(0, 1));
			//System.out.println(array[i - 1].length() - 1);

			if (!(array[i].substring(0, 1)).equals(array[i - 1].substring(array[i - 1].length() - 1))) {
				System.out.println("No");
				return;
			}
		} int i = 0; int i = 0; i 0 i < length i length i++ i++ i {
			//System.out.println(i);
			array[i] = sc.nextLine();
			//System.out.println(array[i]);
			if (i == 0) {
				continue;
			}

			//デバッグ用メソッド
			//System.out.println(i);

			//System.out.println(array[i].substring(0, 1));
			//System.out.println(array[i - 1].length() - 1);

			if (!(array[i].substring(0, 1)).equals(array[i - 1].substring(array[i - 1].length() - 1))) {
				System.out.println("No");
				return;
			}
		} {
			//System.out.println(i);
			array[i] = sc.nextLine();
			//System.out.println(array[i]);
			if (i == 0) {
				continue;
			}

			//デバッグ用メソッド
			//System.out.println(i);

			//System.out.println(array[i].substring(0, 1));
			//System.out.println(array[i - 1].length() - 1);

			if (!(array[i].substring(0, 1)).equals(array[i - 1].substring(array[i - 1].length() - 1))) {
				System.out.println("No");
				return;
			}
		} array[i] = sc.nextLine() array[i] array i sc.nextLine() sc.nextLine sc if (i == 0) {
				continue;
			} i == 0 i 0 {
				continue;
			} continue; if (!(array[i].substring(0, 1)).equals(array[i - 1].substring(array[i - 1].length() - 1))) {
				System.out.println("No");
				return;
			} !(array[i].substring(0, 1)).equals(array[i - 1].substring(array[i - 1].length() - 1)) (array[i].substring(0, 1)).equals(array[i - 1].substring(array[i - 1].length() - 1)) (array[i].substring(0, 1)).equals (array[i].substring(0, 1)) array[i].substring array[i] array i 0 1 array[i - 1].substring(array[i - 1].length() - 1) array[i - 1].substring array[i - 1] array i - 1 i 1 array[i - 1].length() - 1 array[i - 1].length() array[i - 1].length array[i - 1] array i - 1 i 1 1 {
				System.out.println("No");
				return;
			} System.out.println("No") System.out.println System.out System System.out "No" return; for (int i = 0; i < length - 1; i++) {
			for (int j = i + 1; j < length; j++) {
				if (array[i].equals(array[j])) {
					System.out.println("No");
					return;
				}
			}
		} int i = 0; int i = 0; i 0 i < length - 1 i length - 1 length 1 i++ i++ i {
			for (int j = i + 1; j < length; j++) {
				if (array[i].equals(array[j])) {
					System.out.println("No");
					return;
				}
			}
		} {
			for (int j = i + 1; j < length; j++) {
				if (array[i].equals(array[j])) {
					System.out.println("No");
					return;
				}
			}
		} for (int j = i + 1; j < length; j++) {
				if (array[i].equals(array[j])) {
					System.out.println("No");
					return;
				}
			} int j = i + 1; int j = i + 1; j i + 1 i 1 j < length j length j++ j++ j {
				if (array[i].equals(array[j])) {
					System.out.println("No");
					return;
				}
			} {
				if (array[i].equals(array[j])) {
					System.out.println("No");
					return;
				}
			} if (array[i].equals(array[j])) {
					System.out.println("No");
					return;
				} array[i].equals(array[j]) array[i].equals array[i] array i array[j] array j {
					System.out.println("No");
					return;
				} System.out.println("No") System.out.println System.out System System.out "No" return; System.out.println("Yes") System.out.println 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 length = sc.nextInt();
		sc.nextLine();
		String[] array = new String[length];
		for (int i = 0; i < length; i++) {
			//System.out.println(i);
			array[i] = sc.nextLine();
			//System.out.println(array[i]);
			if (i == 0) {
				continue;
			}

			//デバッグ用メソッド
			//System.out.println(i);

			//System.out.println(array[i].substring(0, 1));
			//System.out.println(array[i - 1].length() - 1);

			if (!(array[i].substring(0, 1)).equals(array[i - 1].substring(array[i - 1].length() - 1))) {
				System.out.println("No");
				return;
			}
		}
		//uniqueチェック
		for (int i = 0; i < length - 1; i++) {
			for (int j = i + 1; j < length; j++) {
				if (array[i].equals(array[j])) {
					System.out.println("No");
					return;
				}
			}
		}
		System.out.println("Yes");
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int length = sc.nextInt();
		sc.nextLine();
		String[] array = new String[length];
		for (int i = 0; i < length; i++) {
			//System.out.println(i);
			array[i] = sc.nextLine();
			//System.out.println(array[i]);
			if (i == 0) {
				continue;
			}

			//デバッグ用メソッド
			//System.out.println(i);

			//System.out.println(array[i].substring(0, 1));
			//System.out.println(array[i - 1].length() - 1);

			if (!(array[i].substring(0, 1)).equals(array[i - 1].substring(array[i - 1].length() - 1))) {
				System.out.println("No");
				return;
			}
		}
		//uniqueチェック
		for (int i = 0; i < length - 1; i++) {
			for (int j = i + 1; j < length; j++) {
				if (array[i].equals(array[j])) {
					System.out.println("No");
					return;
				}
			}
		}
		System.out.println("Yes");
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int length = sc.nextInt();
		sc.nextLine();
		String[] array = new String[length];
		for (int i = 0; i < length; i++) {
			//System.out.println(i);
			array[i] = sc.nextLine();
			//System.out.println(array[i]);
			if (i == 0) {
				continue;
			}

			//デバッグ用メソッド
			//System.out.println(i);

			//System.out.println(array[i].substring(0, 1));
			//System.out.println(array[i - 1].length() - 1);

			if (!(array[i].substring(0, 1)).equals(array[i - 1].substring(array[i - 1].length() - 1))) {
				System.out.println("No");
				return;
			}
		}
		//uniqueチェック
		for (int i = 0; i < length - 1; i++) {
			for (int j = i + 1; j < length; j++) {
				if (array[i].equals(array[j])) {
					System.out.println("No");
					return;
				}
			}
		}
		System.out.println("Yes");
	}

}