import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n;
		List<String> w = new ArrayList<String>();
		List<String> pre = new ArrayList<String>();
		n = sc.nextInt();
		for (int i = 0; i < n; i++) {
			w.add(sc.next());
		}

		boolean ok = true;
		for (int i = 0; i < n; i++) {
			if (i == 0) {
				pre.add(w.get(i));
				continue;
			}

			String s0 = w.get(i - 1);
			String s1 = w.get(i);

			if (pre.contains(s1)) {
				ok = false;
				break;
			}
			if (s0.charAt(s0.length() - 1) != s1.charAt(0)) {
				ok = false;
				break;
			}

			pre.add(s1);
		}

		if (ok) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}

		sc.close();
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n;
		List<String> w = new ArrayList<String>();
		List<String> pre = new ArrayList<String>();
		n = sc.nextInt();
		for (int i = 0; i < n; i++) {
			w.add(sc.next());
		}

		boolean ok = true;
		for (int i = 0; i < n; i++) {
			if (i == 0) {
				pre.add(w.get(i));
				continue;
			}

			String s0 = w.get(i - 1);
			String s1 = w.get(i);

			if (pre.contains(s1)) {
				ok = false;
				break;
			}
			if (s0.charAt(s0.length() - 1) != s1.charAt(0)) {
				ok = false;
				break;
			}

			pre.add(s1);
		}

		if (ok) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}

		sc.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n;
		List<String> w = new ArrayList<String>();
		List<String> pre = new ArrayList<String>();
		n = sc.nextInt();
		for (int i = 0; i < n; i++) {
			w.add(sc.next());
		}

		boolean ok = true;
		for (int i = 0; i < n; i++) {
			if (i == 0) {
				pre.add(w.get(i));
				continue;
			}

			String s0 = w.get(i - 1);
			String s1 = w.get(i);

			if (pre.contains(s1)) {
				ok = false;
				break;
			}
			if (s0.charAt(s0.length() - 1) != s1.charAt(0)) {
				ok = false;
				break;
			}

			pre.add(s1);
		}

		if (ok) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}

		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		int n;
		List<String> w = new ArrayList<String>();
		List<String> pre = new ArrayList<String>();
		n = sc.nextInt();
		for (int i = 0; i < n; i++) {
			w.add(sc.next());
		}

		boolean ok = true;
		for (int i = 0; i < n; i++) {
			if (i == 0) {
				pre.add(w.get(i));
				continue;
			}

			String s0 = w.get(i - 1);
			String s1 = w.get(i);

			if (pre.contains(s1)) {
				ok = false;
				break;
			}
			if (s0.charAt(s0.length() - 1) != s1.charAt(0)) {
				ok = false;
				break;
			}

			pre.add(s1);
		}

		if (ok) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}

		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n; n List<String> w = new ArrayList<String>(); w new ArrayList<String>() List<String> pre = new ArrayList<String>(); pre new ArrayList<String>() n = sc.nextInt() n sc.nextInt() sc.nextInt sc for (int i = 0; i < n; i++) {
			w.add(sc.next());
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			w.add(sc.next());
		} {
			w.add(sc.next());
		} w.add(sc.next()) w.add w sc.next() sc.next sc boolean ok = true; ok true for (int i = 0; i < n; i++) {
			if (i == 0) {
				pre.add(w.get(i));
				continue;
			}

			String s0 = w.get(i - 1);
			String s1 = w.get(i);

			if (pre.contains(s1)) {
				ok = false;
				break;
			}
			if (s0.charAt(s0.length() - 1) != s1.charAt(0)) {
				ok = false;
				break;
			}

			pre.add(s1);
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			if (i == 0) {
				pre.add(w.get(i));
				continue;
			}

			String s0 = w.get(i - 1);
			String s1 = w.get(i);

			if (pre.contains(s1)) {
				ok = false;
				break;
			}
			if (s0.charAt(s0.length() - 1) != s1.charAt(0)) {
				ok = false;
				break;
			}

			pre.add(s1);
		} {
			if (i == 0) {
				pre.add(w.get(i));
				continue;
			}

			String s0 = w.get(i - 1);
			String s1 = w.get(i);

			if (pre.contains(s1)) {
				ok = false;
				break;
			}
			if (s0.charAt(s0.length() - 1) != s1.charAt(0)) {
				ok = false;
				break;
			}

			pre.add(s1);
		} if (i == 0) {
				pre.add(w.get(i));
				continue;
			} i == 0 i 0 {
				pre.add(w.get(i));
				continue;
			} pre.add(w.get(i)) pre.add pre w.get(i) w.get w i continue; String s0 = w.get(i - 1); s0 w.get(i - 1) w.get w i - 1 i 1 String s1 = w.get(i); s1 w.get(i) w.get w i if (pre.contains(s1)) {
				ok = false;
				break;
			} pre.contains(s1) pre.contains pre s1 {
				ok = false;
				break;
			} ok = false ok false break; if (s0.charAt(s0.length() - 1) != s1.charAt(0)) {
				ok = false;
				break;
			} s0.charAt(s0.length() - 1) != s1.charAt(0) s0.charAt(s0.length() - 1) s0.charAt s0 s0.length() - 1 s0.length() s0.length s0 1 s1.charAt(0) s1.charAt s1 0 {
				ok = false;
				break;
			} ok = false ok false break; pre.add(s1) pre.add pre s1 if (ok) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		} ok {
			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" sc.close() sc.close sc String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n;
		List<String> w = new ArrayList<String>();
		List<String> pre = new ArrayList<String>();
		n = sc.nextInt();
		for (int i = 0; i < n; i++) {
			w.add(sc.next());
		}

		boolean ok = true;
		for (int i = 0; i < n; i++) {
			if (i == 0) {
				pre.add(w.get(i));
				continue;
			}

			String s0 = w.get(i - 1);
			String s1 = w.get(i);

			if (pre.contains(s1)) {
				ok = false;
				break;
			}
			if (s0.charAt(s0.length() - 1) != s1.charAt(0)) {
				ok = false;
				break;
			}

			pre.add(s1);
		}

		if (ok) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}

		sc.close();
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n;
		List<String> w = new ArrayList<String>();
		List<String> pre = new ArrayList<String>();
		n = sc.nextInt();
		for (int i = 0; i < n; i++) {
			w.add(sc.next());
		}

		boolean ok = true;
		for (int i = 0; i < n; i++) {
			if (i == 0) {
				pre.add(w.get(i));
				continue;
			}

			String s0 = w.get(i - 1);
			String s1 = w.get(i);

			if (pre.contains(s1)) {
				ok = false;
				break;
			}
			if (s0.charAt(s0.length() - 1) != s1.charAt(0)) {
				ok = false;
				break;
			}

			pre.add(s1);
		}

		if (ok) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}

		sc.close();
	}
} Main
import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n;
		List<String> w = new ArrayList<String>();
		List<String> pre = new ArrayList<String>();
		n = sc.nextInt();
		for (int i = 0; i < n; i++) {
			w.add(sc.next());
		}

		boolean ok = true;
		for (int i = 0; i < n; i++) {
			if (i == 0) {
				pre.add(w.get(i));
				continue;
			}

			String s0 = w.get(i - 1);
			String s1 = w.get(i);

			if (pre.contains(s1)) {
				ok = false;
				break;
			}
			if (s0.charAt(s0.length() - 1) != s1.charAt(0)) {
				ok = false;
				break;
			}

			pre.add(s1);
		}

		if (ok) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}

		sc.close();
	}
}