import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int num = sc.nextInt();
		sc.nextLine();
		List<String> wordList = new ArrayList<>();
		int count =0;
		while(sc.hasNextLine()) {
			if (count >= num) {
				break;
			}
			wordList.add(sc.nextLine());
			count++;
		}
		sc.close();
		
		Set<String> usedWordSet = new HashSet<>();
		Character beforeLastWord = null;
		for (String word : wordList) {
			if (usedWordSet.contains(word)) {
				System.out.println("No");
				return;
			}
			usedWordSet.add(word);
			
			if (beforeLastWord == null) {
				beforeLastWord = Character.valueOf(word.charAt(word.length()-1));
				continue;
			}
			Character firstWord = Character.valueOf(word.charAt(0));
			if (!beforeLastWord.equals(firstWord)) {
				System.out.println("No");
				return;
			}
			beforeLastWord = Character.valueOf(word.charAt(word.length()-1));
		}
		System.out.println("Yes");
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int num = sc.nextInt();
		sc.nextLine();
		List<String> wordList = new ArrayList<>();
		int count =0;
		while(sc.hasNextLine()) {
			if (count >= num) {
				break;
			}
			wordList.add(sc.nextLine());
			count++;
		}
		sc.close();
		
		Set<String> usedWordSet = new HashSet<>();
		Character beforeLastWord = null;
		for (String word : wordList) {
			if (usedWordSet.contains(word)) {
				System.out.println("No");
				return;
			}
			usedWordSet.add(word);
			
			if (beforeLastWord == null) {
				beforeLastWord = Character.valueOf(word.charAt(word.length()-1));
				continue;
			}
			Character firstWord = Character.valueOf(word.charAt(0));
			if (!beforeLastWord.equals(firstWord)) {
				System.out.println("No");
				return;
			}
			beforeLastWord = Character.valueOf(word.charAt(word.length()-1));
		}
		System.out.println("Yes");
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int num = sc.nextInt();
		sc.nextLine();
		List<String> wordList = new ArrayList<>();
		int count =0;
		while(sc.hasNextLine()) {
			if (count >= num) {
				break;
			}
			wordList.add(sc.nextLine());
			count++;
		}
		sc.close();
		
		Set<String> usedWordSet = new HashSet<>();
		Character beforeLastWord = null;
		for (String word : wordList) {
			if (usedWordSet.contains(word)) {
				System.out.println("No");
				return;
			}
			usedWordSet.add(word);
			
			if (beforeLastWord == null) {
				beforeLastWord = Character.valueOf(word.charAt(word.length()-1));
				continue;
			}
			Character firstWord = Character.valueOf(word.charAt(0));
			if (!beforeLastWord.equals(firstWord)) {
				System.out.println("No");
				return;
			}
			beforeLastWord = Character.valueOf(word.charAt(word.length()-1));
		}
		System.out.println("Yes");
	} main {
		Scanner sc = new Scanner(System.in);
		int num = sc.nextInt();
		sc.nextLine();
		List<String> wordList = new ArrayList<>();
		int count =0;
		while(sc.hasNextLine()) {
			if (count >= num) {
				break;
			}
			wordList.add(sc.nextLine());
			count++;
		}
		sc.close();
		
		Set<String> usedWordSet = new HashSet<>();
		Character beforeLastWord = null;
		for (String word : wordList) {
			if (usedWordSet.contains(word)) {
				System.out.println("No");
				return;
			}
			usedWordSet.add(word);
			
			if (beforeLastWord == null) {
				beforeLastWord = Character.valueOf(word.charAt(word.length()-1));
				continue;
			}
			Character firstWord = Character.valueOf(word.charAt(0));
			if (!beforeLastWord.equals(firstWord)) {
				System.out.println("No");
				return;
			}
			beforeLastWord = Character.valueOf(word.charAt(word.length()-1));
		}
		System.out.println("Yes");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int num = sc.nextInt(); num sc.nextInt() sc.nextInt sc sc.nextLine() sc.nextLine sc List<String> wordList = new ArrayList<>(); wordList new ArrayList<>() int count =0; count 0 while(sc.hasNextLine()) {
			if (count >= num) {
				break;
			}
			wordList.add(sc.nextLine());
			count++;
		} sc.hasNextLine() sc.hasNextLine sc {
			if (count >= num) {
				break;
			}
			wordList.add(sc.nextLine());
			count++;
		} if (count >= num) {
				break;
			} count >= num count num {
				break;
			} break; wordList.add(sc.nextLine()) wordList.add wordList sc.nextLine() sc.nextLine sc count++ count sc.close() sc.close sc Set<String> usedWordSet = new HashSet<>(); usedWordSet new HashSet<>() Character beforeLastWord = null; beforeLastWord null for (String word : wordList) {
			if (usedWordSet.contains(word)) {
				System.out.println("No");
				return;
			}
			usedWordSet.add(word);
			
			if (beforeLastWord == null) {
				beforeLastWord = Character.valueOf(word.charAt(word.length()-1));
				continue;
			}
			Character firstWord = Character.valueOf(word.charAt(0));
			if (!beforeLastWord.equals(firstWord)) {
				System.out.println("No");
				return;
			}
			beforeLastWord = Character.valueOf(word.charAt(word.length()-1));
		} String word wordList {
			if (usedWordSet.contains(word)) {
				System.out.println("No");
				return;
			}
			usedWordSet.add(word);
			
			if (beforeLastWord == null) {
				beforeLastWord = Character.valueOf(word.charAt(word.length()-1));
				continue;
			}
			Character firstWord = Character.valueOf(word.charAt(0));
			if (!beforeLastWord.equals(firstWord)) {
				System.out.println("No");
				return;
			}
			beforeLastWord = Character.valueOf(word.charAt(word.length()-1));
		} {
			if (usedWordSet.contains(word)) {
				System.out.println("No");
				return;
			}
			usedWordSet.add(word);
			
			if (beforeLastWord == null) {
				beforeLastWord = Character.valueOf(word.charAt(word.length()-1));
				continue;
			}
			Character firstWord = Character.valueOf(word.charAt(0));
			if (!beforeLastWord.equals(firstWord)) {
				System.out.println("No");
				return;
			}
			beforeLastWord = Character.valueOf(word.charAt(word.length()-1));
		} if (usedWordSet.contains(word)) {
				System.out.println("No");
				return;
			} usedWordSet.contains(word) usedWordSet.contains usedWordSet word {
				System.out.println("No");
				return;
			} System.out.println("No") System.out.println System.out System System.out "No" return; usedWordSet.add(word) usedWordSet.add usedWordSet word if (beforeLastWord == null) {
				beforeLastWord = Character.valueOf(word.charAt(word.length()-1));
				continue;
			} beforeLastWord == null beforeLastWord null {
				beforeLastWord = Character.valueOf(word.charAt(word.length()-1));
				continue;
			} beforeLastWord = Character.valueOf(word.charAt(word.length()-1)) beforeLastWord Character.valueOf(word.charAt(word.length()-1)) Character.valueOf Character word.charAt(word.length()-1) word.charAt word word.length()-1 word.length() word.length word 1 continue; Character firstWord = Character.valueOf(word.charAt(0)); firstWord Character.valueOf(word.charAt(0)) Character.valueOf Character word.charAt(0) word.charAt word 0 if (!beforeLastWord.equals(firstWord)) {
				System.out.println("No");
				return;
			} !beforeLastWord.equals(firstWord) beforeLastWord.equals(firstWord) beforeLastWord.equals beforeLastWord firstWord {
				System.out.println("No");
				return;
			} System.out.println("No") System.out.println System.out System System.out "No" return; beforeLastWord = Character.valueOf(word.charAt(word.length()-1)) beforeLastWord Character.valueOf(word.charAt(word.length()-1)) Character.valueOf Character word.charAt(word.length()-1) word.charAt word word.length()-1 word.length() word.length word 1 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 num = sc.nextInt();
		sc.nextLine();
		List<String> wordList = new ArrayList<>();
		int count =0;
		while(sc.hasNextLine()) {
			if (count >= num) {
				break;
			}
			wordList.add(sc.nextLine());
			count++;
		}
		sc.close();
		
		Set<String> usedWordSet = new HashSet<>();
		Character beforeLastWord = null;
		for (String word : wordList) {
			if (usedWordSet.contains(word)) {
				System.out.println("No");
				return;
			}
			usedWordSet.add(word);
			
			if (beforeLastWord == null) {
				beforeLastWord = Character.valueOf(word.charAt(word.length()-1));
				continue;
			}
			Character firstWord = Character.valueOf(word.charAt(0));
			if (!beforeLastWord.equals(firstWord)) {
				System.out.println("No");
				return;
			}
			beforeLastWord = Character.valueOf(word.charAt(word.length()-1));
		}
		System.out.println("Yes");
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int num = sc.nextInt();
		sc.nextLine();
		List<String> wordList = new ArrayList<>();
		int count =0;
		while(sc.hasNextLine()) {
			if (count >= num) {
				break;
			}
			wordList.add(sc.nextLine());
			count++;
		}
		sc.close();
		
		Set<String> usedWordSet = new HashSet<>();
		Character beforeLastWord = null;
		for (String word : wordList) {
			if (usedWordSet.contains(word)) {
				System.out.println("No");
				return;
			}
			usedWordSet.add(word);
			
			if (beforeLastWord == null) {
				beforeLastWord = Character.valueOf(word.charAt(word.length()-1));
				continue;
			}
			Character firstWord = Character.valueOf(word.charAt(0));
			if (!beforeLastWord.equals(firstWord)) {
				System.out.println("No");
				return;
			}
			beforeLastWord = Character.valueOf(word.charAt(word.length()-1));
		}
		System.out.println("Yes");
	}
} Main
import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int num = sc.nextInt();
		sc.nextLine();
		List<String> wordList = new ArrayList<>();
		int count =0;
		while(sc.hasNextLine()) {
			if (count >= num) {
				break;
			}
			wordList.add(sc.nextLine());
			count++;
		}
		sc.close();
		
		Set<String> usedWordSet = new HashSet<>();
		Character beforeLastWord = null;
		for (String word : wordList) {
			if (usedWordSet.contains(word)) {
				System.out.println("No");
				return;
			}
			usedWordSet.add(word);
			
			if (beforeLastWord == null) {
				beforeLastWord = Character.valueOf(word.charAt(word.length()-1));
				continue;
			}
			Character firstWord = Character.valueOf(word.charAt(0));
			if (!beforeLastWord.equals(firstWord)) {
				System.out.println("No");
				return;
			}
			beforeLastWord = Character.valueOf(word.charAt(word.length()-1));
		}
		System.out.println("Yes");
	}
}