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];

		for(int i=0; i<N; i++) {
			W[i] = sc.next();
		}

		int judge1 = 0;

		for(int j=0; j<N-1; j++) {
			char c1 = W[j].charAt(W[j].length()-1);
			char c2 = W[j+1].charAt(0);

			if(c1 == c2) {
				judge1 += 1;
			}
		}

		int judge2 = 0;

		for(int k=0; k<N-1; k++) {
			for(int l=1; l<N-k; l++) {
				if(W[k].equals(W[k+l])) {
					judge2 += 1;
				}
			}
		}

		if(judge1 == N-1 && judge2 == 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];

		for(int i=0; i<N; i++) {
			W[i] = sc.next();
		}

		int judge1 = 0;

		for(int j=0; j<N-1; j++) {
			char c1 = W[j].charAt(W[j].length()-1);
			char c2 = W[j+1].charAt(0);

			if(c1 == c2) {
				judge1 += 1;
			}
		}

		int judge2 = 0;

		for(int k=0; k<N-1; k++) {
			for(int l=1; l<N-k; l++) {
				if(W[k].equals(W[k+l])) {
					judge2 += 1;
				}
			}
		}

		if(judge1 == N-1 && judge2 == 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];

		for(int i=0; i<N; i++) {
			W[i] = sc.next();
		}

		int judge1 = 0;

		for(int j=0; j<N-1; j++) {
			char c1 = W[j].charAt(W[j].length()-1);
			char c2 = W[j+1].charAt(0);

			if(c1 == c2) {
				judge1 += 1;
			}
		}

		int judge2 = 0;

		for(int k=0; k<N-1; k++) {
			for(int l=1; l<N-k; l++) {
				if(W[k].equals(W[k+l])) {
					judge2 += 1;
				}
			}
		}

		if(judge1 == N-1 && judge2 == 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];

		for(int i=0; i<N; i++) {
			W[i] = sc.next();
		}

		int judge1 = 0;

		for(int j=0; j<N-1; j++) {
			char c1 = W[j].charAt(W[j].length()-1);
			char c2 = W[j+1].charAt(0);

			if(c1 == c2) {
				judge1 += 1;
			}
		}

		int judge2 = 0;

		for(int k=0; k<N-1; k++) {
			for(int l=1; l<N-k; l++) {
				if(W[k].equals(W[k+l])) {
					judge2 += 1;
				}
			}
		}

		if(judge1 == N-1 && judge2 == 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]; W new String[N] N for(int i=0; i<N; i++) {
			W[i] = sc.next();
		} int i=0; int i=0; i 0 i<N i N i++ i++ i {
			W[i] = sc.next();
		} {
			W[i] = sc.next();
		} W[i] = sc.next() W[i] W i sc.next() sc.next sc int judge1 = 0; judge1 0 for(int j=0; j<N-1; j++) {
			char c1 = W[j].charAt(W[j].length()-1);
			char c2 = W[j+1].charAt(0);

			if(c1 == c2) {
				judge1 += 1;
			}
		} int j=0; int j=0; j 0 j<N-1 j N-1 N 1 j++ j++ j {
			char c1 = W[j].charAt(W[j].length()-1);
			char c2 = W[j+1].charAt(0);

			if(c1 == c2) {
				judge1 += 1;
			}
		} {
			char c1 = W[j].charAt(W[j].length()-1);
			char c2 = W[j+1].charAt(0);

			if(c1 == c2) {
				judge1 += 1;
			}
		} char c1 = W[j].charAt(W[j].length()-1); c1 W[j].charAt(W[j].length()-1) W[j].charAt W[j] W j W[j].length()-1 W[j].length() W[j].length W[j] W j 1 char c2 = W[j+1].charAt(0); c2 W[j+1].charAt(0) W[j+1].charAt W[j+1] W j+1 j 1 0 if(c1 == c2) {
				judge1 += 1;
			} c1 == c2 c1 c2 {
				judge1 += 1;
			} judge1 += 1 judge1 1 int judge2 = 0; judge2 0 for(int k=0; k<N-1; k++) {
			for(int l=1; l<N-k; l++) {
				if(W[k].equals(W[k+l])) {
					judge2 += 1;
				}
			}
		} int k=0; int k=0; k 0 k<N-1 k N-1 N 1 k++ k++ k {
			for(int l=1; l<N-k; l++) {
				if(W[k].equals(W[k+l])) {
					judge2 += 1;
				}
			}
		} {
			for(int l=1; l<N-k; l++) {
				if(W[k].equals(W[k+l])) {
					judge2 += 1;
				}
			}
		} for(int l=1; l<N-k; l++) {
				if(W[k].equals(W[k+l])) {
					judge2 += 1;
				}
			} int l=1; int l=1; l 1 l<N-k l N-k N k l++ l++ l {
				if(W[k].equals(W[k+l])) {
					judge2 += 1;
				}
			} {
				if(W[k].equals(W[k+l])) {
					judge2 += 1;
				}
			} if(W[k].equals(W[k+l])) {
					judge2 += 1;
				} W[k].equals(W[k+l]) W[k].equals W[k] W k W[k+l] W k+l k l {
					judge2 += 1;
				} judge2 += 1 judge2 1 if(judge1 == N-1 && judge2 == 0) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		} judge1 == N-1 && judge2 == 0 judge1 == N-1 judge1 N-1 N 1 judge2 == 0 judge2 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];

		for(int i=0; i<N; i++) {
			W[i] = sc.next();
		}

		int judge1 = 0;

		for(int j=0; j<N-1; j++) {
			char c1 = W[j].charAt(W[j].length()-1);
			char c2 = W[j+1].charAt(0);

			if(c1 == c2) {
				judge1 += 1;
			}
		}

		int judge2 = 0;

		for(int k=0; k<N-1; k++) {
			for(int l=1; l<N-k; l++) {
				if(W[k].equals(W[k+l])) {
					judge2 += 1;
				}
			}
		}

		if(judge1 == N-1 && judge2 == 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];

		for(int i=0; i<N; i++) {
			W[i] = sc.next();
		}

		int judge1 = 0;

		for(int j=0; j<N-1; j++) {
			char c1 = W[j].charAt(W[j].length()-1);
			char c2 = W[j+1].charAt(0);

			if(c1 == c2) {
				judge1 += 1;
			}
		}

		int judge2 = 0;

		for(int k=0; k<N-1; k++) {
			for(int l=1; l<N-k; l++) {
				if(W[k].equals(W[k+l])) {
					judge2 += 1;
				}
			}
		}

		if(judge1 == N-1 && judge2 == 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];

		for(int i=0; i<N; i++) {
			W[i] = sc.next();
		}

		int judge1 = 0;

		for(int j=0; j<N-1; j++) {
			char c1 = W[j].charAt(W[j].length()-1);
			char c2 = W[j+1].charAt(0);

			if(c1 == c2) {
				judge1 += 1;
			}
		}

		int judge2 = 0;

		for(int k=0; k<N-1; k++) {
			for(int l=1; l<N-k; l++) {
				if(W[k].equals(W[k+l])) {
					judge2 += 1;
				}
			}
		}

		if(judge1 == N-1 && judge2 == 0) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}

	}

}