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);
		sc.nextLine();
		
		String word = null;
		String prevWord = null;
		Set<String> wordSet = new HashSet<>();
		boolean failed = false;
		while (sc.hasNextLine()) {
			word = sc.nextLine();
			if (!wordSet.add(word)) {
				failed = true;
				break;
			}
			if (prevWord != null) {
				boolean chained = (prevWord.charAt(prevWord.length() - 1) == word.charAt(0));
				if (!chained) {
					failed = true;
					break;
				}
			}
			prevWord = word;
		}
		System.out.println(failed ? "No" : "Yes");
	}
} 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);
		sc.nextLine();
		
		String word = null;
		String prevWord = null;
		Set<String> wordSet = new HashSet<>();
		boolean failed = false;
		while (sc.hasNextLine()) {
			word = sc.nextLine();
			if (!wordSet.add(word)) {
				failed = true;
				break;
			}
			if (prevWord != null) {
				boolean chained = (prevWord.charAt(prevWord.length() - 1) == word.charAt(0));
				if (!chained) {
					failed = true;
					break;
				}
			}
			prevWord = word;
		}
		System.out.println(failed ? "No" : "Yes");
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		sc.nextLine();
		
		String word = null;
		String prevWord = null;
		Set<String> wordSet = new HashSet<>();
		boolean failed = false;
		while (sc.hasNextLine()) {
			word = sc.nextLine();
			if (!wordSet.add(word)) {
				failed = true;
				break;
			}
			if (prevWord != null) {
				boolean chained = (prevWord.charAt(prevWord.length() - 1) == word.charAt(0));
				if (!chained) {
					failed = true;
					break;
				}
			}
			prevWord = word;
		}
		System.out.println(failed ? "No" : "Yes");
	} main {
		Scanner sc = new Scanner(System.in);
		sc.nextLine();
		
		String word = null;
		String prevWord = null;
		Set<String> wordSet = new HashSet<>();
		boolean failed = false;
		while (sc.hasNextLine()) {
			word = sc.nextLine();
			if (!wordSet.add(word)) {
				failed = true;
				break;
			}
			if (prevWord != null) {
				boolean chained = (prevWord.charAt(prevWord.length() - 1) == word.charAt(0));
				if (!chained) {
					failed = true;
					break;
				}
			}
			prevWord = word;
		}
		System.out.println(failed ? "No" : "Yes");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) sc.nextLine() sc.nextLine sc String word = null; word null String prevWord = null; prevWord null Set<String> wordSet = new HashSet<>(); wordSet new HashSet<>() boolean failed = false; failed false while (sc.hasNextLine()) {
			word = sc.nextLine();
			if (!wordSet.add(word)) {
				failed = true;
				break;
			}
			if (prevWord != null) {
				boolean chained = (prevWord.charAt(prevWord.length() - 1) == word.charAt(0));
				if (!chained) {
					failed = true;
					break;
				}
			}
			prevWord = word;
		} sc.hasNextLine() sc.hasNextLine sc {
			word = sc.nextLine();
			if (!wordSet.add(word)) {
				failed = true;
				break;
			}
			if (prevWord != null) {
				boolean chained = (prevWord.charAt(prevWord.length() - 1) == word.charAt(0));
				if (!chained) {
					failed = true;
					break;
				}
			}
			prevWord = word;
		} word = sc.nextLine() word sc.nextLine() sc.nextLine sc if (!wordSet.add(word)) {
				failed = true;
				break;
			} !wordSet.add(word) wordSet.add(word) wordSet.add wordSet word {
				failed = true;
				break;
			} failed = true failed true break; if (prevWord != null) {
				boolean chained = (prevWord.charAt(prevWord.length() - 1) == word.charAt(0));
				if (!chained) {
					failed = true;
					break;
				}
			} prevWord != null prevWord null {
				boolean chained = (prevWord.charAt(prevWord.length() - 1) == word.charAt(0));
				if (!chained) {
					failed = true;
					break;
				}
			} boolean chained = (prevWord.charAt(prevWord.length() - 1) == word.charAt(0)); chained (prevWord.charAt(prevWord.length() - 1) == word.charAt(0)) prevWord.charAt(prevWord.length() - 1) prevWord.charAt prevWord prevWord.length() - 1 prevWord.length() prevWord.length prevWord 1 word.charAt(0) word.charAt word 0 if (!chained) {
					failed = true;
					break;
				} !chained chained {
					failed = true;
					break;
				} failed = true failed true break; prevWord = word prevWord word System.out.println(failed ? "No" : "Yes") System.out.println System.out System System.out failed ? "No" : "Yes" failed "No" "Yes" String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		sc.nextLine();
		
		String word = null;
		String prevWord = null;
		Set<String> wordSet = new HashSet<>();
		boolean failed = false;
		while (sc.hasNextLine()) {
			word = sc.nextLine();
			if (!wordSet.add(word)) {
				failed = true;
				break;
			}
			if (prevWord != null) {
				boolean chained = (prevWord.charAt(prevWord.length() - 1) == word.charAt(0));
				if (!chained) {
					failed = true;
					break;
				}
			}
			prevWord = word;
		}
		System.out.println(failed ? "No" : "Yes");
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		sc.nextLine();
		
		String word = null;
		String prevWord = null;
		Set<String> wordSet = new HashSet<>();
		boolean failed = false;
		while (sc.hasNextLine()) {
			word = sc.nextLine();
			if (!wordSet.add(word)) {
				failed = true;
				break;
			}
			if (prevWord != null) {
				boolean chained = (prevWord.charAt(prevWord.length() - 1) == word.charAt(0));
				if (!chained) {
					failed = true;
					break;
				}
			}
			prevWord = word;
		}
		System.out.println(failed ? "No" : "Yes");
	}
} 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);
		sc.nextLine();
		
		String word = null;
		String prevWord = null;
		Set<String> wordSet = new HashSet<>();
		boolean failed = false;
		while (sc.hasNextLine()) {
			word = sc.nextLine();
			if (!wordSet.add(word)) {
				failed = true;
				break;
			}
			if (prevWord != null) {
				boolean chained = (prevWord.charAt(prevWord.length() - 1) == word.charAt(0));
				if (!chained) {
					failed = true;
					break;
				}
			}
			prevWord = word;
		}
		System.out.println(failed ? "No" : "Yes");
	}
}