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

public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		List<String> w = new ArrayList<>();
		for (int i = 0; i < n; i++) {
			String tmp = sc.next();
			if (w.contains(tmp)) {
				System.out.println("No");
				return;
			}
			w.add(tmp);
		}
		for (int i = 0; i < w.size() - 1; i++) {
			String string = w.get(i);
			String nextString = w.get(i + 1);
			char last = string.charAt(string.length() - 1);
			char first = nextString.charAt(0);
			if (last != first) {
				System.out.println("No");
				return;
			}
		}
		System.out.println("Yes");
		sc.close();
	}
} 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) throws Exception {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		List<String> w = new ArrayList<>();
		for (int i = 0; i < n; i++) {
			String tmp = sc.next();
			if (w.contains(tmp)) {
				System.out.println("No");
				return;
			}
			w.add(tmp);
		}
		for (int i = 0; i < w.size() - 1; i++) {
			String string = w.get(i);
			String nextString = w.get(i + 1);
			char last = string.charAt(string.length() - 1);
			char first = nextString.charAt(0);
			if (last != first) {
				System.out.println("No");
				return;
			}
		}
		System.out.println("Yes");
		sc.close();
	}
} Main public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		List<String> w = new ArrayList<>();
		for (int i = 0; i < n; i++) {
			String tmp = sc.next();
			if (w.contains(tmp)) {
				System.out.println("No");
				return;
			}
			w.add(tmp);
		}
		for (int i = 0; i < w.size() - 1; i++) {
			String string = w.get(i);
			String nextString = w.get(i + 1);
			char last = string.charAt(string.length() - 1);
			char first = nextString.charAt(0);
			if (last != first) {
				System.out.println("No");
				return;
			}
		}
		System.out.println("Yes");
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		List<String> w = new ArrayList<>();
		for (int i = 0; i < n; i++) {
			String tmp = sc.next();
			if (w.contains(tmp)) {
				System.out.println("No");
				return;
			}
			w.add(tmp);
		}
		for (int i = 0; i < w.size() - 1; i++) {
			String string = w.get(i);
			String nextString = w.get(i + 1);
			char last = string.charAt(string.length() - 1);
			char first = nextString.charAt(0);
			if (last != first) {
				System.out.println("No");
				return;
			}
		}
		System.out.println("Yes");
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc List<String> w = new ArrayList<>(); w new ArrayList<>() for (int i = 0; i < n; i++) {
			String tmp = sc.next();
			if (w.contains(tmp)) {
				System.out.println("No");
				return;
			}
			w.add(tmp);
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			String tmp = sc.next();
			if (w.contains(tmp)) {
				System.out.println("No");
				return;
			}
			w.add(tmp);
		} {
			String tmp = sc.next();
			if (w.contains(tmp)) {
				System.out.println("No");
				return;
			}
			w.add(tmp);
		} String tmp = sc.next(); tmp sc.next() sc.next sc if (w.contains(tmp)) {
				System.out.println("No");
				return;
			} w.contains(tmp) w.contains w tmp {
				System.out.println("No");
				return;
			} System.out.println("No") System.out.println System.out System System.out "No" return; w.add(tmp) w.add w tmp for (int i = 0; i < w.size() - 1; i++) {
			String string = w.get(i);
			String nextString = w.get(i + 1);
			char last = string.charAt(string.length() - 1);
			char first = nextString.charAt(0);
			if (last != first) {
				System.out.println("No");
				return;
			}
		} int i = 0; int i = 0; i 0 i < w.size() - 1 i w.size() - 1 w.size() w.size w 1 i++ i++ i {
			String string = w.get(i);
			String nextString = w.get(i + 1);
			char last = string.charAt(string.length() - 1);
			char first = nextString.charAt(0);
			if (last != first) {
				System.out.println("No");
				return;
			}
		} {
			String string = w.get(i);
			String nextString = w.get(i + 1);
			char last = string.charAt(string.length() - 1);
			char first = nextString.charAt(0);
			if (last != first) {
				System.out.println("No");
				return;
			}
		} String string = w.get(i); string w.get(i) w.get w i String nextString = w.get(i + 1); nextString w.get(i + 1) w.get w i + 1 i 1 char last = string.charAt(string.length() - 1); last string.charAt(string.length() - 1) string.charAt string string.length() - 1 string.length() string.length string 1 char first = nextString.charAt(0); first nextString.charAt(0) nextString.charAt nextString 0 if (last != first) {
				System.out.println("No");
				return;
			} last != first last first {
				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" sc.close() sc.close sc String[] args args public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		List<String> w = new ArrayList<>();
		for (int i = 0; i < n; i++) {
			String tmp = sc.next();
			if (w.contains(tmp)) {
				System.out.println("No");
				return;
			}
			w.add(tmp);
		}
		for (int i = 0; i < w.size() - 1; i++) {
			String string = w.get(i);
			String nextString = w.get(i + 1);
			char last = string.charAt(string.length() - 1);
			char first = nextString.charAt(0);
			if (last != first) {
				System.out.println("No");
				return;
			}
		}
		System.out.println("Yes");
		sc.close();
	}
} public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		List<String> w = new ArrayList<>();
		for (int i = 0; i < n; i++) {
			String tmp = sc.next();
			if (w.contains(tmp)) {
				System.out.println("No");
				return;
			}
			w.add(tmp);
		}
		for (int i = 0; i < w.size() - 1; i++) {
			String string = w.get(i);
			String nextString = w.get(i + 1);
			char last = string.charAt(string.length() - 1);
			char first = nextString.charAt(0);
			if (last != first) {
				System.out.println("No");
				return;
			}
		}
		System.out.println("Yes");
		sc.close();
	}
} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		List<String> w = new ArrayList<>();
		for (int i = 0; i < n; i++) {
			String tmp = sc.next();
			if (w.contains(tmp)) {
				System.out.println("No");
				return;
			}
			w.add(tmp);
		}
		for (int i = 0; i < w.size() - 1; i++) {
			String string = w.get(i);
			String nextString = w.get(i + 1);
			char last = string.charAt(string.length() - 1);
			char first = nextString.charAt(0);
			if (last != first) {
				System.out.println("No");
				return;
			}
		}
		System.out.println("Yes");
		sc.close();
	}
}