import java.util.Arrays;
import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String [][] nArray = new String [n][];
		for(int i = 0; i < n; i++) {
			String num = sc.next();
			nArray[i] = num.split("");
		}
		boolean judge = true;
		out: for(int i = 1; i < n; i++) {
			for(int k = 0; k < i; k++) {
				if(Arrays.equals(nArray[i], nArray[k])) {
					judge = false;
					break out;
				}
			}
		}
		for(int i = 0; i < n-1; i++) {
			if(nArray[i][nArray[i].length-1].equals(nArray[i+1][0])) {
			}else {
				judge = false;
				break;
			}
		}

		if(judge) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	}

} import java.util.Arrays; Arrays java.util 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 [][] nArray = new String [n][];
		for(int i = 0; i < n; i++) {
			String num = sc.next();
			nArray[i] = num.split("");
		}
		boolean judge = true;
		out: for(int i = 1; i < n; i++) {
			for(int k = 0; k < i; k++) {
				if(Arrays.equals(nArray[i], nArray[k])) {
					judge = false;
					break out;
				}
			}
		}
		for(int i = 0; i < n-1; i++) {
			if(nArray[i][nArray[i].length-1].equals(nArray[i+1][0])) {
			}else {
				judge = false;
				break;
			}
		}

		if(judge) {
			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 [][] nArray = new String [n][];
		for(int i = 0; i < n; i++) {
			String num = sc.next();
			nArray[i] = num.split("");
		}
		boolean judge = true;
		out: for(int i = 1; i < n; i++) {
			for(int k = 0; k < i; k++) {
				if(Arrays.equals(nArray[i], nArray[k])) {
					judge = false;
					break out;
				}
			}
		}
		for(int i = 0; i < n-1; i++) {
			if(nArray[i][nArray[i].length-1].equals(nArray[i+1][0])) {
			}else {
				judge = false;
				break;
			}
		}

		if(judge) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String [][] nArray = new String [n][];
		for(int i = 0; i < n; i++) {
			String num = sc.next();
			nArray[i] = num.split("");
		}
		boolean judge = true;
		out: for(int i = 1; i < n; i++) {
			for(int k = 0; k < i; k++) {
				if(Arrays.equals(nArray[i], nArray[k])) {
					judge = false;
					break out;
				}
			}
		}
		for(int i = 0; i < n-1; i++) {
			if(nArray[i][nArray[i].length-1].equals(nArray[i+1][0])) {
			}else {
				judge = false;
				break;
			}
		}

		if(judge) {
			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 [][] nArray = new String [n][]; nArray new String [n][] n for(int i = 0; i < n; i++) {
			String num = sc.next();
			nArray[i] = num.split("");
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			String num = sc.next();
			nArray[i] = num.split("");
		} {
			String num = sc.next();
			nArray[i] = num.split("");
		} String num = sc.next(); num sc.next() sc.next sc nArray[i] = num.split("") nArray[i] nArray i num.split("") num.split num "" boolean judge = true; judge true for(int i = 0; i < n-1; i++) {
			if(nArray[i][nArray[i].length-1].equals(nArray[i+1][0])) {
			}else {
				judge = false;
				break;
			}
		} int i = 0; int i = 0; i 0 i < n-1 i n-1 n 1 i++ i++ i {
			if(nArray[i][nArray[i].length-1].equals(nArray[i+1][0])) {
			}else {
				judge = false;
				break;
			}
		} {
			if(nArray[i][nArray[i].length-1].equals(nArray[i+1][0])) {
			}else {
				judge = false;
				break;
			}
		} if(nArray[i][nArray[i].length-1].equals(nArray[i+1][0])) {
			}else {
				judge = false;
				break;
			} nArray[i][nArray[i].length-1].equals(nArray[i+1][0]) nArray[i][nArray[i].length-1].equals nArray[i][nArray[i].length-1] nArray[i] nArray i nArray[i].length-1 nArray[i].length nArray[i] nArray i nArray[i].length 1 nArray[i+1][0] nArray[i+1] nArray i+1 i 1 0 {
			} {
				judge = false;
				break;
			} judge = false judge false break; if(judge) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		} judge {
			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 [][] nArray = new String [n][];
		for(int i = 0; i < n; i++) {
			String num = sc.next();
			nArray[i] = num.split("");
		}
		boolean judge = true;
		out: for(int i = 1; i < n; i++) {
			for(int k = 0; k < i; k++) {
				if(Arrays.equals(nArray[i], nArray[k])) {
					judge = false;
					break out;
				}
			}
		}
		for(int i = 0; i < n-1; i++) {
			if(nArray[i][nArray[i].length-1].equals(nArray[i+1][0])) {
			}else {
				judge = false;
				break;
			}
		}

		if(judge) {
			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 [][] nArray = new String [n][];
		for(int i = 0; i < n; i++) {
			String num = sc.next();
			nArray[i] = num.split("");
		}
		boolean judge = true;
		out: for(int i = 1; i < n; i++) {
			for(int k = 0; k < i; k++) {
				if(Arrays.equals(nArray[i], nArray[k])) {
					judge = false;
					break out;
				}
			}
		}
		for(int i = 0; i < n-1; i++) {
			if(nArray[i][nArray[i].length-1].equals(nArray[i+1][0])) {
			}else {
				judge = false;
				break;
			}
		}

		if(judge) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	}

} Main
import java.util.Arrays;
import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String [][] nArray = new String [n][];
		for(int i = 0; i < n; i++) {
			String num = sc.next();
			nArray[i] = num.split("");
		}
		boolean judge = true;
		out: for(int i = 1; i < n; i++) {
			for(int k = 0; k < i; k++) {
				if(Arrays.equals(nArray[i], nArray[k])) {
					judge = false;
					break out;
				}
			}
		}
		for(int i = 0; i < n-1; i++) {
			if(nArray[i][nArray[i].length-1].equals(nArray[i+1][0])) {
			}else {
				judge = false;
				break;
			}
		}

		if(judge) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	}

}
