
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = Integer.parseInt(scan.next());
		List<String> list = new ArrayList<>();
		String W = scan.next();
		list.add(W);
		String preW;
		for (int i = 1; i < N; i++) {
			W = scan.next();
			if (list.contains(W)) {
				System.out.println("No");
				return;
			}
			preW = list.get(i - 1);
			if (preW.charAt(preW.length() - 1) != W.charAt(0)) {
				System.out.println("No");
				return;
			}
			list.add(W);
		}
		System.out.println("Yes");

	}
} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = Integer.parseInt(scan.next());
		List<String> list = new ArrayList<>();
		String W = scan.next();
		list.add(W);
		String preW;
		for (int i = 1; i < N; i++) {
			W = scan.next();
			if (list.contains(W)) {
				System.out.println("No");
				return;
			}
			preW = list.get(i - 1);
			if (preW.charAt(preW.length() - 1) != W.charAt(0)) {
				System.out.println("No");
				return;
			}
			list.add(W);
		}
		System.out.println("Yes");

	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = Integer.parseInt(scan.next());
		List<String> list = new ArrayList<>();
		String W = scan.next();
		list.add(W);
		String preW;
		for (int i = 1; i < N; i++) {
			W = scan.next();
			if (list.contains(W)) {
				System.out.println("No");
				return;
			}
			preW = list.get(i - 1);
			if (preW.charAt(preW.length() - 1) != W.charAt(0)) {
				System.out.println("No");
				return;
			}
			list.add(W);
		}
		System.out.println("Yes");

	} main {
		Scanner scan = new Scanner(System.in);
		int N = Integer.parseInt(scan.next());
		List<String> list = new ArrayList<>();
		String W = scan.next();
		list.add(W);
		String preW;
		for (int i = 1; i < N; i++) {
			W = scan.next();
			if (list.contains(W)) {
				System.out.println("No");
				return;
			}
			preW = list.get(i - 1);
			if (preW.charAt(preW.length() - 1) != W.charAt(0)) {
				System.out.println("No");
				return;
			}
			list.add(W);
		}
		System.out.println("Yes");

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N = Integer.parseInt(scan.next()); N Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan List<String> list = new ArrayList<>(); list new ArrayList<>() String W = scan.next(); W scan.next() scan.next scan list.add(W) list.add list W String preW; preW for (int i = 1; i < N; i++) {
			W = scan.next();
			if (list.contains(W)) {
				System.out.println("No");
				return;
			}
			preW = list.get(i - 1);
			if (preW.charAt(preW.length() - 1) != W.charAt(0)) {
				System.out.println("No");
				return;
			}
			list.add(W);
		} int i = 1; int i = 1; i 1 i < N i N i++ i++ i {
			W = scan.next();
			if (list.contains(W)) {
				System.out.println("No");
				return;
			}
			preW = list.get(i - 1);
			if (preW.charAt(preW.length() - 1) != W.charAt(0)) {
				System.out.println("No");
				return;
			}
			list.add(W);
		} {
			W = scan.next();
			if (list.contains(W)) {
				System.out.println("No");
				return;
			}
			preW = list.get(i - 1);
			if (preW.charAt(preW.length() - 1) != W.charAt(0)) {
				System.out.println("No");
				return;
			}
			list.add(W);
		} W = scan.next() W scan.next() scan.next scan if (list.contains(W)) {
				System.out.println("No");
				return;
			} list.contains(W) list.contains list W {
				System.out.println("No");
				return;
			} System.out.println("No") System.out.println System.out System System.out "No" return; preW = list.get(i - 1) preW list.get(i - 1) list.get list i - 1 i 1 if (preW.charAt(preW.length() - 1) != W.charAt(0)) {
				System.out.println("No");
				return;
			} preW.charAt(preW.length() - 1) != W.charAt(0) preW.charAt(preW.length() - 1) preW.charAt preW preW.length() - 1 preW.length() preW.length preW 1 W.charAt(0) W.charAt W 0 {
				System.out.println("No");
				return;
			} System.out.println("No") System.out.println System.out System System.out "No" return; list.add(W) list.add list W 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 scan = new Scanner(System.in);
		int N = Integer.parseInt(scan.next());
		List<String> list = new ArrayList<>();
		String W = scan.next();
		list.add(W);
		String preW;
		for (int i = 1; i < N; i++) {
			W = scan.next();
			if (list.contains(W)) {
				System.out.println("No");
				return;
			}
			preW = list.get(i - 1);
			if (preW.charAt(preW.length() - 1) != W.charAt(0)) {
				System.out.println("No");
				return;
			}
			list.add(W);
		}
		System.out.println("Yes");

	}
} public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = Integer.parseInt(scan.next());
		List<String> list = new ArrayList<>();
		String W = scan.next();
		list.add(W);
		String preW;
		for (int i = 1; i < N; i++) {
			W = scan.next();
			if (list.contains(W)) {
				System.out.println("No");
				return;
			}
			preW = list.get(i - 1);
			if (preW.charAt(preW.length() - 1) != W.charAt(0)) {
				System.out.println("No");
				return;
			}
			list.add(W);
		}
		System.out.println("Yes");

	}
} Main

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = Integer.parseInt(scan.next());
		List<String> list = new ArrayList<>();
		String W = scan.next();
		list.add(W);
		String preW;
		for (int i = 1; i < N; i++) {
			W = scan.next();
			if (list.contains(W)) {
				System.out.println("No");
				return;
			}
			preW = list.get(i - 1);
			if (preW.charAt(preW.length() - 1) != W.charAt(0)) {
				System.out.println("No");
				return;
			}
			list.add(W);
		}
		System.out.println("Yes");

	}
}
