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

class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		HashSet<String> spoken = new HashSet<String>();
		String before = sc.next();
		spoken.add(before);
		boolean valid = true;
		for(int i = 0; i < N - 1; i++) {
			String W = sc.next();
			if(spoken.contains(W)) {
				valid = false;
			}
			if(before.charAt(before.length() - 1) != W.charAt(0)) {
				valid = false;
			}
			before = W;
			spoken.add(W);
		}
		System.out.println(valid ? "Yes" : "No");
	}
} import java.util.HashSet; HashSet java.util import java.util.Scanner; Scanner java.util class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		HashSet<String> spoken = new HashSet<String>();
		String before = sc.next();
		spoken.add(before);
		boolean valid = true;
		for(int i = 0; i < N - 1; i++) {
			String W = sc.next();
			if(spoken.contains(W)) {
				valid = false;
			}
			if(before.charAt(before.length() - 1) != W.charAt(0)) {
				valid = false;
			}
			before = W;
			spoken.add(W);
		}
		System.out.println(valid ? "Yes" : "No");
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		HashSet<String> spoken = new HashSet<String>();
		String before = sc.next();
		spoken.add(before);
		boolean valid = true;
		for(int i = 0; i < N - 1; i++) {
			String W = sc.next();
			if(spoken.contains(W)) {
				valid = false;
			}
			if(before.charAt(before.length() - 1) != W.charAt(0)) {
				valid = false;
			}
			before = W;
			spoken.add(W);
		}
		System.out.println(valid ? "Yes" : "No");
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		HashSet<String> spoken = new HashSet<String>();
		String before = sc.next();
		spoken.add(before);
		boolean valid = true;
		for(int i = 0; i < N - 1; i++) {
			String W = sc.next();
			if(spoken.contains(W)) {
				valid = false;
			}
			if(before.charAt(before.length() - 1) != W.charAt(0)) {
				valid = false;
			}
			before = W;
			spoken.add(W);
		}
		System.out.println(valid ? "Yes" : "No");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc HashSet<String> spoken = new HashSet<String>(); spoken new HashSet<String>() String before = sc.next(); before sc.next() sc.next sc spoken.add(before) spoken.add spoken before boolean valid = true; valid true for(int i = 0; i < N - 1; i++) {
			String W = sc.next();
			if(spoken.contains(W)) {
				valid = false;
			}
			if(before.charAt(before.length() - 1) != W.charAt(0)) {
				valid = false;
			}
			before = W;
			spoken.add(W);
		} int i = 0; int i = 0; i 0 i < N - 1 i N - 1 N 1 i++ i++ i {
			String W = sc.next();
			if(spoken.contains(W)) {
				valid = false;
			}
			if(before.charAt(before.length() - 1) != W.charAt(0)) {
				valid = false;
			}
			before = W;
			spoken.add(W);
		} {
			String W = sc.next();
			if(spoken.contains(W)) {
				valid = false;
			}
			if(before.charAt(before.length() - 1) != W.charAt(0)) {
				valid = false;
			}
			before = W;
			spoken.add(W);
		} String W = sc.next(); W sc.next() sc.next sc if(spoken.contains(W)) {
				valid = false;
			} spoken.contains(W) spoken.contains spoken W {
				valid = false;
			} valid = false valid false if(before.charAt(before.length() - 1) != W.charAt(0)) {
				valid = false;
			} before.charAt(before.length() - 1) != W.charAt(0) before.charAt(before.length() - 1) before.charAt before before.length() - 1 before.length() before.length before 1 W.charAt(0) W.charAt W 0 {
				valid = false;
			} valid = false valid false before = W before W spoken.add(W) spoken.add spoken W System.out.println(valid ? "Yes" : "No") System.out.println System.out System System.out valid ? "Yes" : "No" valid "Yes" "No" String[] args args
import java.util.HashSet;
import java.util.Scanner;

class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		HashSet<String> spoken = new HashSet<String>();
		String before = sc.next();
		spoken.add(before);
		boolean valid = true;
		for(int i = 0; i < N - 1; i++) {
			String W = sc.next();
			if(spoken.contains(W)) {
				valid = false;
			}
			if(before.charAt(before.length() - 1) != W.charAt(0)) {
				valid = false;
			}
			before = W;
			spoken.add(W);
		}
		System.out.println(valid ? "Yes" : "No");
	}
}
