import java.util.*;

public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		String N_str = sc.nextLine();
		final int N = Integer.parseInt(N_str);
		String W[] = new String[N];
		for(int i = 0; i < N; i++) {
			W[i] = sc.nextLine();
		}
		
		boolean flag = true;
		
		for(int i = 0; i < N; i++) {
			if(i >= 1) {
				if(W[i].charAt(0) != W[i - 1].charAt(W[i - 1].length() - 1)) {
					flag = false;
				}
			}
			for(int j = 0; j < i; j++) {
				if(W[i].equals(W[j])) {
					flag = false;
				}
			}
		}
		
		if(flag) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} import java.util.*; util.* java public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		String N_str = sc.nextLine();
		final int N = Integer.parseInt(N_str);
		String W[] = new String[N];
		for(int i = 0; i < N; i++) {
			W[i] = sc.nextLine();
		}
		
		boolean flag = true;
		
		for(int i = 0; i < N; i++) {
			if(i >= 1) {
				if(W[i].charAt(0) != W[i - 1].charAt(W[i - 1].length() - 1)) {
					flag = false;
				}
			}
			for(int j = 0; j < i; j++) {
				if(W[i].equals(W[j])) {
					flag = false;
				}
			}
		}
		
		if(flag) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} Main public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		String N_str = sc.nextLine();
		final int N = Integer.parseInt(N_str);
		String W[] = new String[N];
		for(int i = 0; i < N; i++) {
			W[i] = sc.nextLine();
		}
		
		boolean flag = true;
		
		for(int i = 0; i < N; i++) {
			if(i >= 1) {
				if(W[i].charAt(0) != W[i - 1].charAt(W[i - 1].length() - 1)) {
					flag = false;
				}
			}
			for(int j = 0; j < i; j++) {
				if(W[i].equals(W[j])) {
					flag = false;
				}
			}
		}
		
		if(flag) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	} main {
		Scanner sc = new Scanner(System.in);
		String N_str = sc.nextLine();
		final int N = Integer.parseInt(N_str);
		String W[] = new String[N];
		for(int i = 0; i < N; i++) {
			W[i] = sc.nextLine();
		}
		
		boolean flag = true;
		
		for(int i = 0; i < N; i++) {
			if(i >= 1) {
				if(W[i].charAt(0) != W[i - 1].charAt(W[i - 1].length() - 1)) {
					flag = false;
				}
			}
			for(int j = 0; j < i; j++) {
				if(W[i].equals(W[j])) {
					flag = false;
				}
			}
		}
		
		if(flag) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String N_str = sc.nextLine(); N_str sc.nextLine() sc.nextLine sc final int N = Integer.parseInt(N_str); N Integer.parseInt(N_str) Integer.parseInt Integer N_str String W[] = new String[N]; W new String[N] N for(int i = 0; i < N; i++) {
			W[i] = sc.nextLine();
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			W[i] = sc.nextLine();
		} {
			W[i] = sc.nextLine();
		} W[i] = sc.nextLine() W[i] W i sc.nextLine() sc.nextLine sc boolean flag = true; flag true for(int i = 0; i < N; i++) {
			if(i >= 1) {
				if(W[i].charAt(0) != W[i - 1].charAt(W[i - 1].length() - 1)) {
					flag = false;
				}
			}
			for(int j = 0; j < i; j++) {
				if(W[i].equals(W[j])) {
					flag = false;
				}
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			if(i >= 1) {
				if(W[i].charAt(0) != W[i - 1].charAt(W[i - 1].length() - 1)) {
					flag = false;
				}
			}
			for(int j = 0; j < i; j++) {
				if(W[i].equals(W[j])) {
					flag = false;
				}
			}
		} {
			if(i >= 1) {
				if(W[i].charAt(0) != W[i - 1].charAt(W[i - 1].length() - 1)) {
					flag = false;
				}
			}
			for(int j = 0; j < i; j++) {
				if(W[i].equals(W[j])) {
					flag = false;
				}
			}
		} if(i >= 1) {
				if(W[i].charAt(0) != W[i - 1].charAt(W[i - 1].length() - 1)) {
					flag = false;
				}
			} i >= 1 i 1 {
				if(W[i].charAt(0) != W[i - 1].charAt(W[i - 1].length() - 1)) {
					flag = false;
				}
			} if(W[i].charAt(0) != W[i - 1].charAt(W[i - 1].length() - 1)) {
					flag = false;
				} 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 {
					flag = false;
				} flag = false flag false for(int j = 0; j < i; j++) {
				if(W[i].equals(W[j])) {
					flag = false;
				}
			} int j = 0; int j = 0; j 0 j < i j i j++ j++ j {
				if(W[i].equals(W[j])) {
					flag = false;
				}
			} {
				if(W[i].equals(W[j])) {
					flag = false;
				}
			} if(W[i].equals(W[j])) {
					flag = false;
				} W[i].equals(W[j]) W[i].equals W[i] W i W[j] W j {
					flag = false;
				} flag = false flag false 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);
		String N_str = sc.nextLine();
		final int N = Integer.parseInt(N_str);
		String W[] = new String[N];
		for(int i = 0; i < N; i++) {
			W[i] = sc.nextLine();
		}
		
		boolean flag = true;
		
		for(int i = 0; i < N; i++) {
			if(i >= 1) {
				if(W[i].charAt(0) != W[i - 1].charAt(W[i - 1].length() - 1)) {
					flag = false;
				}
			}
			for(int j = 0; j < i; j++) {
				if(W[i].equals(W[j])) {
					flag = false;
				}
			}
		}
		
		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);
		String N_str = sc.nextLine();
		final int N = Integer.parseInt(N_str);
		String W[] = new String[N];
		for(int i = 0; i < N; i++) {
			W[i] = sc.nextLine();
		}
		
		boolean flag = true;
		
		for(int i = 0; i < N; i++) {
			if(i >= 1) {
				if(W[i].charAt(0) != W[i - 1].charAt(W[i - 1].length() - 1)) {
					flag = false;
				}
			}
			for(int j = 0; j < i; j++) {
				if(W[i].equals(W[j])) {
					flag = false;
				}
			}
		}
		
		if(flag) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} Main
import java.util.*;

public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		String N_str = sc.nextLine();
		final int N = Integer.parseInt(N_str);
		String W[] = new String[N];
		for(int i = 0; i < N; i++) {
			W[i] = sc.nextLine();
		}
		
		boolean flag = true;
		
		for(int i = 0; i < N; i++) {
			if(i >= 1) {
				if(W[i].charAt(0) != W[i - 1].charAt(W[i - 1].length() - 1)) {
					flag = false;
				}
			}
			for(int j = 0; j < i; j++) {
				if(W[i].equals(W[j])) {
					flag = false;
				}
			}
		}
		
		if(flag) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
}
