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

public class Main {
	public static void main(String[] args) throws Exception {
		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();
		}
		sc.close();

		Set<String> set = new HashSet<>();
		set.add(w[0]);
		for (int i = 1; i < n; i++) {
			if (!set.add(w[i]) || w[i - 1].charAt(w[i - 1].length() - 1) != w[i].charAt(0)) {
				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) throws Exception {
		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();
		}
		sc.close();

		Set<String> set = new HashSet<>();
		set.add(w[0]);
		for (int i = 1; i < n; i++) {
			if (!set.add(w[i]) || w[i - 1].charAt(w[i - 1].length() - 1) != w[i].charAt(0)) {
				System.out.println("No");
				return;
			}
		}
		System.out.println("Yes");
	}
} Main public static void main(String[] args) throws Exception {
		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();
		}
		sc.close();

		Set<String> set = new HashSet<>();
		set.add(w[0]);
		for (int i = 1; i < n; i++) {
			if (!set.add(w[i]) || w[i - 1].charAt(w[i - 1].length() - 1) != w[i].charAt(0)) {
				System.out.println("No");
				return;
			}
		}
		System.out.println("Yes");
	} 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();
		}
		sc.close();

		Set<String> set = new HashSet<>();
		set.add(w[0]);
		for (int i = 1; i < n; i++) {
			if (!set.add(w[i]) || w[i - 1].charAt(w[i - 1].length() - 1) != w[i].charAt(0)) {
				System.out.println("No");
				return;
			}
		}
		System.out.println("Yes");
	} 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 sc.close() sc.close sc Set<String> set = new HashSet<>(); set new HashSet<>() set.add(w[0]) set.add set w[0] w 0 for (int i = 1; i < n; i++) {
			if (!set.add(w[i]) || w[i - 1].charAt(w[i - 1].length() - 1) != w[i].charAt(0)) {
				System.out.println("No");
				return;
			}
		} int i = 1; int i = 1; i 1 i < n i n i++ i++ i {
			if (!set.add(w[i]) || w[i - 1].charAt(w[i - 1].length() - 1) != w[i].charAt(0)) {
				System.out.println("No");
				return;
			}
		} {
			if (!set.add(w[i]) || w[i - 1].charAt(w[i - 1].length() - 1) != w[i].charAt(0)) {
				System.out.println("No");
				return;
			}
		} if (!set.add(w[i]) || w[i - 1].charAt(w[i - 1].length() - 1) != w[i].charAt(0)) {
				System.out.println("No");
				return;
			} !set.add(w[i]) || w[i - 1].charAt(w[i - 1].length() - 1) != w[i].charAt(0) !set.add(w[i]) set.add(w[i]) set.add set w[i] w i w[i - 1].charAt(w[i - 1].length() - 1) != w[i].charAt(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 w[i].charAt(0) w[i].charAt w[i] w i 0 {
				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) throws Exception {
		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();
		}
		sc.close();

		Set<String> set = new HashSet<>();
		set.add(w[0]);
		for (int i = 1; i < n; i++) {
			if (!set.add(w[i]) || w[i - 1].charAt(w[i - 1].length() - 1) != w[i].charAt(0)) {
				System.out.println("No");
				return;
			}
		}
		System.out.println("Yes");
	}
} public class Main {
	public static void main(String[] args) throws Exception {
		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();
		}
		sc.close();

		Set<String> set = new HashSet<>();
		set.add(w[0]);
		for (int i = 1; i < n; i++) {
			if (!set.add(w[i]) || w[i - 1].charAt(w[i - 1].length() - 1) != w[i].charAt(0)) {
				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) throws Exception {
		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();
		}
		sc.close();

		Set<String> set = new HashSet<>();
		set.add(w[0]);
		for (int i = 1; i < n; i++) {
			if (!set.add(w[i]) || w[i - 1].charAt(w[i - 1].length() - 1) != w[i].charAt(0)) {
				System.out.println("No");
				return;
			}
		}
		System.out.println("Yes");
	}
}
