import java.util.ArrayList;
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		ArrayList<String> list = new ArrayList<>();
		String newWord;

		for (int i = 0; i < N; i++) {
			newWord = sc.next();
			if (list.contains(newWord)
					|| (!list.isEmpty() && !(list.get(list.size() - 1)).endsWith(String.valueOf(newWord.charAt(0))))) {
				System.out.println("No");
				return;
			} else {
				list.add(newWord);
			}
		}
		System.out.println("Yes");
	}
} import java.util.ArrayList; ArrayList java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		ArrayList<String> list = new ArrayList<>();
		String newWord;

		for (int i = 0; i < N; i++) {
			newWord = sc.next();
			if (list.contains(newWord)
					|| (!list.isEmpty() && !(list.get(list.size() - 1)).endsWith(String.valueOf(newWord.charAt(0))))) {
				System.out.println("No");
				return;
			} else {
				list.add(newWord);
			}
		}
		System.out.println("Yes");
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		ArrayList<String> list = new ArrayList<>();
		String newWord;

		for (int i = 0; i < N; i++) {
			newWord = sc.next();
			if (list.contains(newWord)
					|| (!list.isEmpty() && !(list.get(list.size() - 1)).endsWith(String.valueOf(newWord.charAt(0))))) {
				System.out.println("No");
				return;
			} else {
				list.add(newWord);
			}
		}
		System.out.println("Yes");
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		ArrayList<String> list = new ArrayList<>();
		String newWord;

		for (int i = 0; i < N; i++) {
			newWord = sc.next();
			if (list.contains(newWord)
					|| (!list.isEmpty() && !(list.get(list.size() - 1)).endsWith(String.valueOf(newWord.charAt(0))))) {
				System.out.println("No");
				return;
			} else {
				list.add(newWord);
			}
		}
		System.out.println("Yes");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc ArrayList<String> list = new ArrayList<>(); list new ArrayList<>() String newWord; newWord for (int i = 0; i < N; i++) {
			newWord = sc.next();
			if (list.contains(newWord)
					|| (!list.isEmpty() && !(list.get(list.size() - 1)).endsWith(String.valueOf(newWord.charAt(0))))) {
				System.out.println("No");
				return;
			} else {
				list.add(newWord);
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			newWord = sc.next();
			if (list.contains(newWord)
					|| (!list.isEmpty() && !(list.get(list.size() - 1)).endsWith(String.valueOf(newWord.charAt(0))))) {
				System.out.println("No");
				return;
			} else {
				list.add(newWord);
			}
		} {
			newWord = sc.next();
			if (list.contains(newWord)
					|| (!list.isEmpty() && !(list.get(list.size() - 1)).endsWith(String.valueOf(newWord.charAt(0))))) {
				System.out.println("No");
				return;
			} else {
				list.add(newWord);
			}
		} newWord = sc.next() newWord sc.next() sc.next sc if (list.contains(newWord)
					|| (!list.isEmpty() && !(list.get(list.size() - 1)).endsWith(String.valueOf(newWord.charAt(0))))) {
				System.out.println("No");
				return;
			} else {
				list.add(newWord);
			} list.contains(newWord)
					|| (!list.isEmpty() && !(list.get(list.size() - 1)).endsWith(String.valueOf(newWord.charAt(0)))) list.contains(newWord) list.contains list newWord (!list.isEmpty() && !(list.get(list.size() - 1)).endsWith(String.valueOf(newWord.charAt(0)))) !list.isEmpty() list.isEmpty() list.isEmpty list !(list.get(list.size() - 1)).endsWith(String.valueOf(newWord.charAt(0))) (list.get(list.size() - 1)).endsWith(String.valueOf(newWord.charAt(0))) (list.get(list.size() - 1)).endsWith (list.get(list.size() - 1)) list.get list list.size() - 1 list.size() list.size list 1 String.valueOf(newWord.charAt(0)) String.valueOf String newWord.charAt(0) newWord.charAt newWord 0 {
				System.out.println("No");
				return;
			} System.out.println("No") System.out.println System.out System System.out "No" return; {
				list.add(newWord);
			} list.add(newWord) list.add list newWord 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 sc = new Scanner(System.in);
		int N = sc.nextInt();
		ArrayList<String> list = new ArrayList<>();
		String newWord;

		for (int i = 0; i < N; i++) {
			newWord = sc.next();
			if (list.contains(newWord)
					|| (!list.isEmpty() && !(list.get(list.size() - 1)).endsWith(String.valueOf(newWord.charAt(0))))) {
				System.out.println("No");
				return;
			} else {
				list.add(newWord);
			}
		}
		System.out.println("Yes");
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		ArrayList<String> list = new ArrayList<>();
		String newWord;

		for (int i = 0; i < N; i++) {
			newWord = sc.next();
			if (list.contains(newWord)
					|| (!list.isEmpty() && !(list.get(list.size() - 1)).endsWith(String.valueOf(newWord.charAt(0))))) {
				System.out.println("No");
				return;
			} else {
				list.add(newWord);
			}
		}
		System.out.println("Yes");
	}
} Main
import java.util.ArrayList;
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		ArrayList<String> list = new ArrayList<>();
		String newWord;

		for (int i = 0; i < N; i++) {
			newWord = sc.next();
			if (list.contains(newWord)
					|| (!list.isEmpty() && !(list.get(list.size() - 1)).endsWith(String.valueOf(newWord.charAt(0))))) {
				System.out.println("No");
				return;
			} else {
				list.add(newWord);
			}
		}
		System.out.println("Yes");
	}
}