import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		String[] W = new String[N + 1];
		W[0] = null;
		int count_a = 0;
		int count_b = 0;
		
		for(int i = 1; i < (N + 1); i++) {
			W[i]  = sc.next();
			if((i >= 2) && (W[i].charAt(0) == W[i - 1].charAt(W[i - 1].length() - 1))) {
				count_a++;
			}
		}
		
		for(int i = 2; i < (N + 1); i++) {
			for(int j = 1; j < i; j++) {
				if(W[i].equals(W[j])) {
					count_b++;
				}
			}
		}
		
		
		if((count_a == (N - 1)) && count_b == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}		
	}
} 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[] W = new String[N + 1];
		W[0] = null;
		int count_a = 0;
		int count_b = 0;
		
		for(int i = 1; i < (N + 1); i++) {
			W[i]  = sc.next();
			if((i >= 2) && (W[i].charAt(0) == W[i - 1].charAt(W[i - 1].length() - 1))) {
				count_a++;
			}
		}
		
		for(int i = 2; i < (N + 1); i++) {
			for(int j = 1; j < i; j++) {
				if(W[i].equals(W[j])) {
					count_b++;
				}
			}
		}
		
		
		if((count_a == (N - 1)) && count_b == 0) {
			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();
		String[] W = new String[N + 1];
		W[0] = null;
		int count_a = 0;
		int count_b = 0;
		
		for(int i = 1; i < (N + 1); i++) {
			W[i]  = sc.next();
			if((i >= 2) && (W[i].charAt(0) == W[i - 1].charAt(W[i - 1].length() - 1))) {
				count_a++;
			}
		}
		
		for(int i = 2; i < (N + 1); i++) {
			for(int j = 1; j < i; j++) {
				if(W[i].equals(W[j])) {
					count_b++;
				}
			}
		}
		
		
		if((count_a == (N - 1)) && count_b == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}		
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		String[] W = new String[N + 1];
		W[0] = null;
		int count_a = 0;
		int count_b = 0;
		
		for(int i = 1; i < (N + 1); i++) {
			W[i]  = sc.next();
			if((i >= 2) && (W[i].charAt(0) == W[i - 1].charAt(W[i - 1].length() - 1))) {
				count_a++;
			}
		}
		
		for(int i = 2; i < (N + 1); i++) {
			for(int j = 1; j < i; j++) {
				if(W[i].equals(W[j])) {
					count_b++;
				}
			}
		}
		
		
		if((count_a == (N - 1)) && count_b == 0) {
			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 String[] W = new String[N + 1]; W new String[N + 1] N + 1 N 1 W[0] = null W[0] W 0 null int count_a = 0; count_a 0 int count_b = 0; count_b 0 for(int i = 1; i < (N + 1); i++) {
			W[i]  = sc.next();
			if((i >= 2) && (W[i].charAt(0) == W[i - 1].charAt(W[i - 1].length() - 1))) {
				count_a++;
			}
		} int i = 1; int i = 1; i 1 i < (N + 1) i (N + 1) N 1 i++ i++ i {
			W[i]  = sc.next();
			if((i >= 2) && (W[i].charAt(0) == W[i - 1].charAt(W[i - 1].length() - 1))) {
				count_a++;
			}
		} {
			W[i]  = sc.next();
			if((i >= 2) && (W[i].charAt(0) == W[i - 1].charAt(W[i - 1].length() - 1))) {
				count_a++;
			}
		} W[i]  = sc.next() W[i] W i sc.next() sc.next sc if((i >= 2) && (W[i].charAt(0) == W[i - 1].charAt(W[i - 1].length() - 1))) {
				count_a++;
			} (i >= 2) && (W[i].charAt(0) == W[i - 1].charAt(W[i - 1].length() - 1)) (i >= 2) i 2 (W[i].charAt(0) == W[i - 1].charAt(W[i - 1].length() - 1)) W[i].charAt(0) W[i].charAt W[i] W i 0 W[i - 1].charAt(W[i - 1].length() - 1) W[i - 1].charAt W[i - 1] W i - 1 i 1 W[i - 1].length() - 1 W[i - 1].length() W[i - 1].length W[i - 1] W i - 1 i 1 1 {
				count_a++;
			} count_a++ count_a for(int i = 2; i < (N + 1); i++) {
			for(int j = 1; j < i; j++) {
				if(W[i].equals(W[j])) {
					count_b++;
				}
			}
		} int i = 2; int i = 2; i 2 i < (N + 1) i (N + 1) N 1 i++ i++ i {
			for(int j = 1; j < i; j++) {
				if(W[i].equals(W[j])) {
					count_b++;
				}
			}
		} {
			for(int j = 1; j < i; j++) {
				if(W[i].equals(W[j])) {
					count_b++;
				}
			}
		} for(int j = 1; j < i; j++) {
				if(W[i].equals(W[j])) {
					count_b++;
				}
			} int j = 1; int j = 1; j 1 j < i j i j++ j++ j {
				if(W[i].equals(W[j])) {
					count_b++;
				}
			} {
				if(W[i].equals(W[j])) {
					count_b++;
				}
			} if(W[i].equals(W[j])) {
					count_b++;
				} W[i].equals(W[j]) W[i].equals W[i] W i W[j] W j {
					count_b++;
				} count_b++ count_b if((count_a == (N - 1)) && count_b == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		} (count_a == (N - 1)) && count_b == 0 (count_a == (N - 1)) count_a (N - 1) N 1 count_b == 0 count_b 0 {
			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();
		String[] W = new String[N + 1];
		W[0] = null;
		int count_a = 0;
		int count_b = 0;
		
		for(int i = 1; i < (N + 1); i++) {
			W[i]  = sc.next();
			if((i >= 2) && (W[i].charAt(0) == W[i - 1].charAt(W[i - 1].length() - 1))) {
				count_a++;
			}
		}
		
		for(int i = 2; i < (N + 1); i++) {
			for(int j = 1; j < i; j++) {
				if(W[i].equals(W[j])) {
					count_b++;
				}
			}
		}
		
		
		if((count_a == (N - 1)) && count_b == 0) {
			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();
		String[] W = new String[N + 1];
		W[0] = null;
		int count_a = 0;
		int count_b = 0;
		
		for(int i = 1; i < (N + 1); i++) {
			W[i]  = sc.next();
			if((i >= 2) && (W[i].charAt(0) == W[i - 1].charAt(W[i - 1].length() - 1))) {
				count_a++;
			}
		}
		
		for(int i = 2; i < (N + 1); i++) {
			for(int j = 1; j < i; j++) {
				if(W[i].equals(W[j])) {
					count_b++;
				}
			}
		}
		
		
		if((count_a == (N - 1)) && count_b == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}		
	}
} 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[] W = new String[N + 1];
		W[0] = null;
		int count_a = 0;
		int count_b = 0;
		
		for(int i = 1; i < (N + 1); i++) {
			W[i]  = sc.next();
			if((i >= 2) && (W[i].charAt(0) == W[i - 1].charAt(W[i - 1].length() - 1))) {
				count_a++;
			}
		}
		
		for(int i = 2; i < (N + 1); i++) {
			for(int j = 1; j < i; j++) {
				if(W[i].equals(W[j])) {
					count_b++;
				}
			}
		}
		
		
		if((count_a == (N - 1)) && count_b == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}		
	}
}
