import java.util.*;
import java.util.stream.*;

public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		Set<String> set = new HashSet<>();
		int n = in.nextInt(); in.nextLine();
		String before = in.nextLine();
		set.add(before);
		for (int i = 1; i < n; i++) {
			String str = in.nextLine();
			if(set.contains(str) || before.charAt(before.length() - 1) != str.charAt(0)) {
				System.out.println("No");
				return;
			}
			set.add(str);
			before = str;
		}
		System.out.println("Yes");
	}
} import java.util.*; util.* java import java.util.stream.*; stream.* java.util public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		Set<String> set = new HashSet<>();
		int n = in.nextInt(); in.nextLine();
		String before = in.nextLine();
		set.add(before);
		for (int i = 1; i < n; i++) {
			String str = in.nextLine();
			if(set.contains(str) || before.charAt(before.length() - 1) != str.charAt(0)) {
				System.out.println("No");
				return;
			}
			set.add(str);
			before = str;
		}
		System.out.println("Yes");
	}
} Main public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		Set<String> set = new HashSet<>();
		int n = in.nextInt(); in.nextLine();
		String before = in.nextLine();
		set.add(before);
		for (int i = 1; i < n; i++) {
			String str = in.nextLine();
			if(set.contains(str) || before.charAt(before.length() - 1) != str.charAt(0)) {
				System.out.println("No");
				return;
			}
			set.add(str);
			before = str;
		}
		System.out.println("Yes");
	} main {
		Scanner in = new Scanner(System.in);
		Set<String> set = new HashSet<>();
		int n = in.nextInt(); in.nextLine();
		String before = in.nextLine();
		set.add(before);
		for (int i = 1; i < n; i++) {
			String str = in.nextLine();
			if(set.contains(str) || before.charAt(before.length() - 1) != str.charAt(0)) {
				System.out.println("No");
				return;
			}
			set.add(str);
			before = str;
		}
		System.out.println("Yes");
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) Set<String> set = new HashSet<>(); set new HashSet<>() int n = in.nextInt(); n in.nextInt() in.nextInt in in.nextLine() in.nextLine in String before = in.nextLine(); before in.nextLine() in.nextLine in set.add(before) set.add set before for (int i = 1; i < n; i++) {
			String str = in.nextLine();
			if(set.contains(str) || before.charAt(before.length() - 1) != str.charAt(0)) {
				System.out.println("No");
				return;
			}
			set.add(str);
			before = str;
		} int i = 1; int i = 1; i 1 i < n i n i++ i++ i {
			String str = in.nextLine();
			if(set.contains(str) || before.charAt(before.length() - 1) != str.charAt(0)) {
				System.out.println("No");
				return;
			}
			set.add(str);
			before = str;
		} {
			String str = in.nextLine();
			if(set.contains(str) || before.charAt(before.length() - 1) != str.charAt(0)) {
				System.out.println("No");
				return;
			}
			set.add(str);
			before = str;
		} String str = in.nextLine(); str in.nextLine() in.nextLine in if(set.contains(str) || before.charAt(before.length() - 1) != str.charAt(0)) {
				System.out.println("No");
				return;
			} set.contains(str) || before.charAt(before.length() - 1) != str.charAt(0) set.contains(str) set.contains set str before.charAt(before.length() - 1) != str.charAt(0) before.charAt(before.length() - 1) before.charAt before before.length() - 1 before.length() before.length before 1 str.charAt(0) str.charAt str 0 {
				System.out.println("No");
				return;
			} System.out.println("No") System.out.println System.out System System.out "No" return; set.add(str) set.add set str before = str before str 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 in = new Scanner(System.in);
		Set<String> set = new HashSet<>();
		int n = in.nextInt(); in.nextLine();
		String before = in.nextLine();
		set.add(before);
		for (int i = 1; i < n; i++) {
			String str = in.nextLine();
			if(set.contains(str) || before.charAt(before.length() - 1) != str.charAt(0)) {
				System.out.println("No");
				return;
			}
			set.add(str);
			before = str;
		}
		System.out.println("Yes");
	}
} public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		Set<String> set = new HashSet<>();
		int n = in.nextInt(); in.nextLine();
		String before = in.nextLine();
		set.add(before);
		for (int i = 1; i < n; i++) {
			String str = in.nextLine();
			if(set.contains(str) || before.charAt(before.length() - 1) != str.charAt(0)) {
				System.out.println("No");
				return;
			}
			set.add(str);
			before = str;
		}
		System.out.println("Yes");
	}
} Main
import java.util.*;
import java.util.stream.*;

public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		Set<String> set = new HashSet<>();
		int n = in.nextInt(); in.nextLine();
		String before = in.nextLine();
		set.add(before);
		for (int i = 1; i < n; i++) {
			String str = in.nextLine();
			if(set.contains(str) || before.charAt(before.length() - 1) != str.charAt(0)) {
				System.out.println("No");
				return;
			}
			set.add(str);
			before = str;
		}
		System.out.println("Yes");
	}
}