
import java.util.LinkedHashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();

		String[] list = new String[n];
		for (int i = 0; i < list.length; i++) {
			list[i] = scan.next();
		}

		char previous = list[0].charAt(list[0].length() - 1);

		String ans = "Yes";

		Set<String> linkedHashSet = new LinkedHashSet<String>();
		for (int i = 0; i < list.length; i++) {
			linkedHashSet.add(list[i]);
		}
		
		if(linkedHashSet.size() != list.length) {
			ans = "No";
		} else {
			for (int i = 1; i < list.length; i++) {
				if (previous != list[i].charAt(0)) {
					ans = "No";
					break;
				}
				previous = list[i].charAt(list[i].length() - 1);
			}
		}

		System.out.println(ans);
	}
} import java.util.LinkedHashSet; LinkedHashSet 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 scan = new Scanner(System.in);
		int n = scan.nextInt();

		String[] list = new String[n];
		for (int i = 0; i < list.length; i++) {
			list[i] = scan.next();
		}

		char previous = list[0].charAt(list[0].length() - 1);

		String ans = "Yes";

		Set<String> linkedHashSet = new LinkedHashSet<String>();
		for (int i = 0; i < list.length; i++) {
			linkedHashSet.add(list[i]);
		}
		
		if(linkedHashSet.size() != list.length) {
			ans = "No";
		} else {
			for (int i = 1; i < list.length; i++) {
				if (previous != list[i].charAt(0)) {
					ans = "No";
					break;
				}
				previous = list[i].charAt(list[i].length() - 1);
			}
		}

		System.out.println(ans);
	}
} Main public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();

		String[] list = new String[n];
		for (int i = 0; i < list.length; i++) {
			list[i] = scan.next();
		}

		char previous = list[0].charAt(list[0].length() - 1);

		String ans = "Yes";

		Set<String> linkedHashSet = new LinkedHashSet<String>();
		for (int i = 0; i < list.length; i++) {
			linkedHashSet.add(list[i]);
		}
		
		if(linkedHashSet.size() != list.length) {
			ans = "No";
		} else {
			for (int i = 1; i < list.length; i++) {
				if (previous != list[i].charAt(0)) {
					ans = "No";
					break;
				}
				previous = list[i].charAt(list[i].length() - 1);
			}
		}

		System.out.println(ans);
	} main {

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();

		String[] list = new String[n];
		for (int i = 0; i < list.length; i++) {
			list[i] = scan.next();
		}

		char previous = list[0].charAt(list[0].length() - 1);

		String ans = "Yes";

		Set<String> linkedHashSet = new LinkedHashSet<String>();
		for (int i = 0; i < list.length; i++) {
			linkedHashSet.add(list[i]);
		}
		
		if(linkedHashSet.size() != list.length) {
			ans = "No";
		} else {
			for (int i = 1; i < list.length; i++) {
				if (previous != list[i].charAt(0)) {
					ans = "No";
					break;
				}
				previous = list[i].charAt(list[i].length() - 1);
			}
		}

		System.out.println(ans);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan String[] list = new String[n]; list new String[n] n for (int i = 0; i < list.length; i++) {
			list[i] = scan.next();
		} int i = 0; int i = 0; i 0 i < list.length i list.length list list.length i++ i++ i {
			list[i] = scan.next();
		} {
			list[i] = scan.next();
		} list[i] = scan.next() list[i] list i scan.next() scan.next scan char previous = list[0].charAt(list[0].length() - 1); previous list[0].charAt(list[0].length() - 1) list[0].charAt list[0] list 0 list[0].length() - 1 list[0].length() list[0].length list[0] list 0 1 String ans = "Yes"; ans "Yes" Set<String> linkedHashSet = new LinkedHashSet<String>(); linkedHashSet new LinkedHashSet<String>() for (int i = 0; i < list.length; i++) {
			linkedHashSet.add(list[i]);
		} int i = 0; int i = 0; i 0 i < list.length i list.length list list.length i++ i++ i {
			linkedHashSet.add(list[i]);
		} {
			linkedHashSet.add(list[i]);
		} linkedHashSet.add(list[i]) linkedHashSet.add linkedHashSet list[i] list i if(linkedHashSet.size() != list.length) {
			ans = "No";
		} else {
			for (int i = 1; i < list.length; i++) {
				if (previous != list[i].charAt(0)) {
					ans = "No";
					break;
				}
				previous = list[i].charAt(list[i].length() - 1);
			}
		} linkedHashSet.size() != list.length linkedHashSet.size() linkedHashSet.size linkedHashSet list.length list list.length {
			ans = "No";
		} ans = "No" ans "No" {
			for (int i = 1; i < list.length; i++) {
				if (previous != list[i].charAt(0)) {
					ans = "No";
					break;
				}
				previous = list[i].charAt(list[i].length() - 1);
			}
		} for (int i = 1; i < list.length; i++) {
				if (previous != list[i].charAt(0)) {
					ans = "No";
					break;
				}
				previous = list[i].charAt(list[i].length() - 1);
			} int i = 1; int i = 1; i 1 i < list.length i list.length list list.length i++ i++ i {
				if (previous != list[i].charAt(0)) {
					ans = "No";
					break;
				}
				previous = list[i].charAt(list[i].length() - 1);
			} {
				if (previous != list[i].charAt(0)) {
					ans = "No";
					break;
				}
				previous = list[i].charAt(list[i].length() - 1);
			} if (previous != list[i].charAt(0)) {
					ans = "No";
					break;
				} previous != list[i].charAt(0) previous list[i].charAt(0) list[i].charAt list[i] list i 0 {
					ans = "No";
					break;
				} ans = "No" ans "No" break; previous = list[i].charAt(list[i].length() - 1) previous list[i].charAt(list[i].length() - 1) list[i].charAt list[i] list i list[i].length() - 1 list[i].length() list[i].length list[i] list i 1 System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();

		String[] list = new String[n];
		for (int i = 0; i < list.length; i++) {
			list[i] = scan.next();
		}

		char previous = list[0].charAt(list[0].length() - 1);

		String ans = "Yes";

		Set<String> linkedHashSet = new LinkedHashSet<String>();
		for (int i = 0; i < list.length; i++) {
			linkedHashSet.add(list[i]);
		}
		
		if(linkedHashSet.size() != list.length) {
			ans = "No";
		} else {
			for (int i = 1; i < list.length; i++) {
				if (previous != list[i].charAt(0)) {
					ans = "No";
					break;
				}
				previous = list[i].charAt(list[i].length() - 1);
			}
		}

		System.out.println(ans);
	}
} public class Main {
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();

		String[] list = new String[n];
		for (int i = 0; i < list.length; i++) {
			list[i] = scan.next();
		}

		char previous = list[0].charAt(list[0].length() - 1);

		String ans = "Yes";

		Set<String> linkedHashSet = new LinkedHashSet<String>();
		for (int i = 0; i < list.length; i++) {
			linkedHashSet.add(list[i]);
		}
		
		if(linkedHashSet.size() != list.length) {
			ans = "No";
		} else {
			for (int i = 1; i < list.length; i++) {
				if (previous != list[i].charAt(0)) {
					ans = "No";
					break;
				}
				previous = list[i].charAt(list[i].length() - 1);
			}
		}

		System.out.println(ans);
	}
} Main

import java.util.LinkedHashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();

		String[] list = new String[n];
		for (int i = 0; i < list.length; i++) {
			list[i] = scan.next();
		}

		char previous = list[0].charAt(list[0].length() - 1);

		String ans = "Yes";

		Set<String> linkedHashSet = new LinkedHashSet<String>();
		for (int i = 0; i < list.length; i++) {
			linkedHashSet.add(list[i]);
		}
		
		if(linkedHashSet.size() != list.length) {
			ans = "No";
		} else {
			for (int i = 1; i < list.length; i++) {
				if (previous != list[i].charAt(0)) {
					ans = "No";
					break;
				}
				previous = list[i].charAt(list[i].length() - 1);
			}
		}

		System.out.println(ans);
	}
}