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 S[] = new String[N];
		boolean isFollowRule = true;
		Set set = new HashSet<String>();

		for (int i = 0; i < N; i++) {
			S[i] = sc.next();
			set.add(S[i]);
			if (i != 0 && !(S[i - 1].substring(S[i - 1].length() - 1).equals(S[i].substring(0, 1)))) {
				isFollowRule = false;
			}
		}

		if (N == set.size() && isFollowRule) {
			System.out.println("Yes");
		} else {
			System.out.println("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 S[] = new String[N];
		boolean isFollowRule = true;
		Set set = new HashSet<String>();

		for (int i = 0; i < N; i++) {
			S[i] = sc.next();
			set.add(S[i]);
			if (i != 0 && !(S[i - 1].substring(S[i - 1].length() - 1).equals(S[i].substring(0, 1)))) {
				isFollowRule = false;
			}
		}

		if (N == set.size() && isFollowRule) {
			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 S[] = new String[N];
		boolean isFollowRule = true;
		Set set = new HashSet<String>();

		for (int i = 0; i < N; i++) {
			S[i] = sc.next();
			set.add(S[i]);
			if (i != 0 && !(S[i - 1].substring(S[i - 1].length() - 1).equals(S[i].substring(0, 1)))) {
				isFollowRule = false;
			}
		}

		if (N == set.size() && isFollowRule) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		String S[] = new String[N];
		boolean isFollowRule = true;
		Set set = new HashSet<String>();

		for (int i = 0; i < N; i++) {
			S[i] = sc.next();
			set.add(S[i]);
			if (i != 0 && !(S[i - 1].substring(S[i - 1].length() - 1).equals(S[i].substring(0, 1)))) {
				isFollowRule = false;
			}
		}

		if (N == set.size() && isFollowRule) {
			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 S[] = new String[N]; S new String[N] N boolean isFollowRule = true; isFollowRule true Set set = new HashSet<String>(); set new HashSet<String>() for (int i = 0; i < N; i++) {
			S[i] = sc.next();
			set.add(S[i]);
			if (i != 0 && !(S[i - 1].substring(S[i - 1].length() - 1).equals(S[i].substring(0, 1)))) {
				isFollowRule = false;
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			S[i] = sc.next();
			set.add(S[i]);
			if (i != 0 && !(S[i - 1].substring(S[i - 1].length() - 1).equals(S[i].substring(0, 1)))) {
				isFollowRule = false;
			}
		} {
			S[i] = sc.next();
			set.add(S[i]);
			if (i != 0 && !(S[i - 1].substring(S[i - 1].length() - 1).equals(S[i].substring(0, 1)))) {
				isFollowRule = false;
			}
		} S[i] = sc.next() S[i] S i sc.next() sc.next sc set.add(S[i]) set.add set S[i] S i if (i != 0 && !(S[i - 1].substring(S[i - 1].length() - 1).equals(S[i].substring(0, 1)))) {
				isFollowRule = false;
			} i != 0 && !(S[i - 1].substring(S[i - 1].length() - 1).equals(S[i].substring(0, 1))) i != 0 i 0 !(S[i - 1].substring(S[i - 1].length() - 1).equals(S[i].substring(0, 1))) (S[i - 1].substring(S[i - 1].length() - 1).equals(S[i].substring(0, 1))) S[i - 1].substring(S[i - 1].length() - 1).equals S[i - 1].substring(S[i - 1].length() - 1) S[i - 1].substring S[i - 1] S i - 1 i 1 S[i - 1].length() - 1 S[i - 1].length() S[i - 1].length S[i - 1] S i - 1 i 1 1 S[i].substring(0, 1) S[i].substring S[i] S i 0 1 {
				isFollowRule = false;
			} isFollowRule = false isFollowRule false if (N == set.size() && isFollowRule) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		} N == set.size() && isFollowRule N == set.size() N set.size() set.size set isFollowRule {
			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 S[] = new String[N];
		boolean isFollowRule = true;
		Set set = new HashSet<String>();

		for (int i = 0; i < N; i++) {
			S[i] = sc.next();
			set.add(S[i]);
			if (i != 0 && !(S[i - 1].substring(S[i - 1].length() - 1).equals(S[i].substring(0, 1)))) {
				isFollowRule = false;
			}
		}

		if (N == set.size() && isFollowRule) {
			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 S[] = new String[N];
		boolean isFollowRule = true;
		Set set = new HashSet<String>();

		for (int i = 0; i < N; i++) {
			S[i] = sc.next();
			set.add(S[i]);
			if (i != 0 && !(S[i - 1].substring(S[i - 1].length() - 1).equals(S[i].substring(0, 1)))) {
				isFollowRule = false;
			}
		}

		if (N == set.size() && isFollowRule) {
			System.out.println("Yes");
		} else {
			System.out.println("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 S[] = new String[N];
		boolean isFollowRule = true;
		Set set = new HashSet<String>();

		for (int i = 0; i < N; i++) {
			S[i] = sc.next();
			set.add(S[i]);
			if (i != 0 && !(S[i - 1].substring(S[i - 1].length() - 1).equals(S[i].substring(0, 1)))) {
				isFollowRule = false;
			}
		}

		if (N == set.size() && isFollowRule) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
}
