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

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		final int N = sc.nextInt();
		String[] w = new String[N];
		Set<String> ws = new HashSet<>();
		for (int i = 0; i < N; i++) {
			w[i] = sc.next();
			ws.add(w[i]);
		}
		if (ws.size() != N) {
			System.out.println("No");
			return;
		}
		for (int i = 0; i < w.length - 1 ; i++) {
			if (w[i+1].charAt(0) != w[i].charAt(w[i].length() -1)) {
				System.out.println("No");
				return;
			}
		}
		System.out.println("Yes");
	}
} import java.util.HashSet; HashSet java.util import java.util.Scanner; Scanner java.util import java.util.Set; Set java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		final int N = sc.nextInt();
		String[] w = new String[N];
		Set<String> ws = new HashSet<>();
		for (int i = 0; i < N; i++) {
			w[i] = sc.next();
			ws.add(w[i]);
		}
		if (ws.size() != N) {
			System.out.println("No");
			return;
		}
		for (int i = 0; i < w.length - 1 ; i++) {
			if (w[i+1].charAt(0) != w[i].charAt(w[i].length() -1)) {
				System.out.println("No");
				return;
			}
		}
		System.out.println("Yes");
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		final int N = sc.nextInt();
		String[] w = new String[N];
		Set<String> ws = new HashSet<>();
		for (int i = 0; i < N; i++) {
			w[i] = sc.next();
			ws.add(w[i]);
		}
		if (ws.size() != N) {
			System.out.println("No");
			return;
		}
		for (int i = 0; i < w.length - 1 ; i++) {
			if (w[i+1].charAt(0) != w[i].charAt(w[i].length() -1)) {
				System.out.println("No");
				return;
			}
		}
		System.out.println("Yes");
	} main {
		Scanner sc = new Scanner(System.in);
		final int N = sc.nextInt();
		String[] w = new String[N];
		Set<String> ws = new HashSet<>();
		for (int i = 0; i < N; i++) {
			w[i] = sc.next();
			ws.add(w[i]);
		}
		if (ws.size() != N) {
			System.out.println("No");
			return;
		}
		for (int i = 0; i < w.length - 1 ; i++) {
			if (w[i+1].charAt(0) != w[i].charAt(w[i].length() -1)) {
				System.out.println("No");
				return;
			}
		}
		System.out.println("Yes");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc String[] w = new String[N]; w new String[N] N Set<String> ws = new HashSet<>(); ws new HashSet<>() for (int i = 0; i < N; i++) {
			w[i] = sc.next();
			ws.add(w[i]);
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			w[i] = sc.next();
			ws.add(w[i]);
		} {
			w[i] = sc.next();
			ws.add(w[i]);
		} w[i] = sc.next() w[i] w i sc.next() sc.next sc ws.add(w[i]) ws.add ws w[i] w i if (ws.size() != N) {
			System.out.println("No");
			return;
		} ws.size() != N ws.size() ws.size ws N {
			System.out.println("No");
			return;
		} System.out.println("No") System.out.println System.out System System.out "No" return; for (int i = 0; i < w.length - 1 ; i++) {
			if (w[i+1].charAt(0) != w[i].charAt(w[i].length() -1)) {
				System.out.println("No");
				return;
			}
		} int i = 0; int i = 0; i 0 i < w.length - 1 i w.length - 1 w.length w w.length 1 i++ i++ i {
			if (w[i+1].charAt(0) != w[i].charAt(w[i].length() -1)) {
				System.out.println("No");
				return;
			}
		} {
			if (w[i+1].charAt(0) != w[i].charAt(w[i].length() -1)) {
				System.out.println("No");
				return;
			}
		} if (w[i+1].charAt(0) != w[i].charAt(w[i].length() -1)) {
				System.out.println("No");
				return;
			} w[i+1].charAt(0) != w[i].charAt(w[i].length() -1) w[i+1].charAt(0) w[i+1].charAt w[i+1] w i+1 i 1 0 w[i].charAt(w[i].length() -1) w[i].charAt w[i] w i w[i].length() -1 w[i].length() w[i].length w[i] w i 1 {
				System.out.println("No");
				return;
			} System.out.println("No") System.out.println System.out System System.out "No" return; System.out.println("Yes") System.out.println System.out System System.out "Yes" String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		final int N = sc.nextInt();
		String[] w = new String[N];
		Set<String> ws = new HashSet<>();
		for (int i = 0; i < N; i++) {
			w[i] = sc.next();
			ws.add(w[i]);
		}
		if (ws.size() != N) {
			System.out.println("No");
			return;
		}
		for (int i = 0; i < w.length - 1 ; i++) {
			if (w[i+1].charAt(0) != w[i].charAt(w[i].length() -1)) {
				System.out.println("No");
				return;
			}
		}
		System.out.println("Yes");
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		final int N = sc.nextInt();
		String[] w = new String[N];
		Set<String> ws = new HashSet<>();
		for (int i = 0; i < N; i++) {
			w[i] = sc.next();
			ws.add(w[i]);
		}
		if (ws.size() != N) {
			System.out.println("No");
			return;
		}
		for (int i = 0; i < w.length - 1 ; i++) {
			if (w[i+1].charAt(0) != w[i].charAt(w[i].length() -1)) {
				System.out.println("No");
				return;
			}
		}
		System.out.println("Yes");
	}
} Main
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		final int N = sc.nextInt();
		String[] w = new String[N];
		Set<String> ws = new HashSet<>();
		for (int i = 0; i < N; i++) {
			w[i] = sc.next();
			ws.add(w[i]);
		}
		if (ws.size() != N) {
			System.out.println("No");
			return;
		}
		for (int i = 0; i < w.length - 1 ; i++) {
			if (w[i+1].charAt(0) != w[i].charAt(w[i].length() -1)) {
				System.out.println("No");
				return;
			}
		}
		System.out.println("Yes");
	}
}