
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		boolean flag = true;
		Set<String> set = new HashSet<>();
		String s = sc.next();
		char tail = s.charAt(s.length() - 1);
		set.add(s);
		for(int i = 1; i < n; i++) {
			s = sc.next();
			if(tail != s.charAt(0) || set.contains(s)) {
				flag = false;
				break;
			} else {
				tail = s.charAt(s.length() - 1);
				set.add(s);
			}
		}
		if(flag) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}

	}

} import java.util.HashSet; HashSet 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 sc = new Scanner(System.in);
		int n = sc.nextInt();
		boolean flag = true;
		Set<String> set = new HashSet<>();
		String s = sc.next();
		char tail = s.charAt(s.length() - 1);
		set.add(s);
		for(int i = 1; i < n; i++) {
			s = sc.next();
			if(tail != s.charAt(0) || set.contains(s)) {
				flag = false;
				break;
			} else {
				tail = s.charAt(s.length() - 1);
				set.add(s);
			}
		}
		if(flag) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}

	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		boolean flag = true;
		Set<String> set = new HashSet<>();
		String s = sc.next();
		char tail = s.charAt(s.length() - 1);
		set.add(s);
		for(int i = 1; i < n; i++) {
			s = sc.next();
			if(tail != s.charAt(0) || set.contains(s)) {
				flag = false;
				break;
			} else {
				tail = s.charAt(s.length() - 1);
				set.add(s);
			}
		}
		if(flag) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}

	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		boolean flag = true;
		Set<String> set = new HashSet<>();
		String s = sc.next();
		char tail = s.charAt(s.length() - 1);
		set.add(s);
		for(int i = 1; i < n; i++) {
			s = sc.next();
			if(tail != s.charAt(0) || set.contains(s)) {
				flag = false;
				break;
			} else {
				tail = s.charAt(s.length() - 1);
				set.add(s);
			}
		}
		if(flag) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc boolean flag = true; flag true Set<String> set = new HashSet<>(); set new HashSet<>() String s = sc.next(); s sc.next() sc.next sc char tail = s.charAt(s.length() - 1); tail s.charAt(s.length() - 1) s.charAt s s.length() - 1 s.length() s.length s 1 set.add(s) set.add set s for(int i = 1; i < n; i++) {
			s = sc.next();
			if(tail != s.charAt(0) || set.contains(s)) {
				flag = false;
				break;
			} else {
				tail = s.charAt(s.length() - 1);
				set.add(s);
			}
		} int i = 1; int i = 1; i 1 i < n i n i++ i++ i {
			s = sc.next();
			if(tail != s.charAt(0) || set.contains(s)) {
				flag = false;
				break;
			} else {
				tail = s.charAt(s.length() - 1);
				set.add(s);
			}
		} {
			s = sc.next();
			if(tail != s.charAt(0) || set.contains(s)) {
				flag = false;
				break;
			} else {
				tail = s.charAt(s.length() - 1);
				set.add(s);
			}
		} s = sc.next() s sc.next() sc.next sc if(tail != s.charAt(0) || set.contains(s)) {
				flag = false;
				break;
			} else {
				tail = s.charAt(s.length() - 1);
				set.add(s);
			} tail != s.charAt(0) || set.contains(s) tail != s.charAt(0) tail s.charAt(0) s.charAt s 0 set.contains(s) set.contains set s {
				flag = false;
				break;
			} flag = false flag false break; {
				tail = s.charAt(s.length() - 1);
				set.add(s);
			} tail = s.charAt(s.length() - 1) tail s.charAt(s.length() - 1) s.charAt s s.length() - 1 s.length() s.length s 1 set.add(s) set.add set s if(flag) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		} flag {
			System.out.println("Yes");
		} System.out.println("Yes") System.out.println System.out System System.out "Yes" {
			System.out.println("No");
		} System.out.println("No") System.out.println System.out System System.out "No" String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		boolean flag = true;
		Set<String> set = new HashSet<>();
		String s = sc.next();
		char tail = s.charAt(s.length() - 1);
		set.add(s);
		for(int i = 1; i < n; i++) {
			s = sc.next();
			if(tail != s.charAt(0) || set.contains(s)) {
				flag = false;
				break;
			} else {
				tail = s.charAt(s.length() - 1);
				set.add(s);
			}
		}
		if(flag) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}

	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		boolean flag = true;
		Set<String> set = new HashSet<>();
		String s = sc.next();
		char tail = s.charAt(s.length() - 1);
		set.add(s);
		for(int i = 1; i < n; i++) {
			s = sc.next();
			if(tail != s.charAt(0) || set.contains(s)) {
				flag = false;
				break;
			} else {
				tail = s.charAt(s.length() - 1);
				set.add(s);
			}
		}
		if(flag) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}

	}

} Main

import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		boolean flag = true;
		Set<String> set = new HashSet<>();
		String s = sc.next();
		char tail = s.charAt(s.length() - 1);
		set.add(s);
		for(int i = 1; i < n; i++) {
			s = sc.next();
			if(tail != s.charAt(0) || set.contains(s)) {
				flag = false;
				break;
			} else {
				tail = s.charAt(s.length() - 1);
				set.add(s);
			}
		}
		if(flag) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}

	}

}
