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

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

	}

} 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);

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

	}

} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

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

	} main {

		Scanner sc = new Scanner(System.in);

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

	}

} 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);

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

	}

}
