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);
		int n = sc.nextInt();
		
		Set<String> set = new HashSet<>();
		String first = sc.next();
		set.add(first);
		
		char tail = first.charAt(first.length() - 1);
		for (int i = 0; i < n - 1; i++) {
			String word = sc.next();
			if (!set.add(word) || tail != word.charAt(0)) {
				System.out.println("No");
				sc.close();
				return;
			}
			tail = word.charAt(word.length() - 1);
		}
		
		System.out.println("Yes");
		
		sc.close();
	}
}

 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);
		int n = sc.nextInt();
		
		Set<String> set = new HashSet<>();
		String first = sc.next();
		set.add(first);
		
		char tail = first.charAt(first.length() - 1);
		for (int i = 0; i < n - 1; i++) {
			String word = sc.next();
			if (!set.add(word) || tail != word.charAt(0)) {
				System.out.println("No");
				sc.close();
				return;
			}
			tail = word.charAt(word.length() - 1);
		}
		
		System.out.println("Yes");
		
		sc.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		
		Set<String> set = new HashSet<>();
		String first = sc.next();
		set.add(first);
		
		char tail = first.charAt(first.length() - 1);
		for (int i = 0; i < n - 1; i++) {
			String word = sc.next();
			if (!set.add(word) || tail != word.charAt(0)) {
				System.out.println("No");
				sc.close();
				return;
			}
			tail = word.charAt(word.length() - 1);
		}
		
		System.out.println("Yes");
		
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		
		Set<String> set = new HashSet<>();
		String first = sc.next();
		set.add(first);
		
		char tail = first.charAt(first.length() - 1);
		for (int i = 0; i < n - 1; i++) {
			String word = sc.next();
			if (!set.add(word) || tail != word.charAt(0)) {
				System.out.println("No");
				sc.close();
				return;
			}
			tail = word.charAt(word.length() - 1);
		}
		
		System.out.println("Yes");
		
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc Set<String> set = new HashSet<>(); set new HashSet<>() String first = sc.next(); first sc.next() sc.next sc set.add(first) set.add set first char tail = first.charAt(first.length() - 1); tail first.charAt(first.length() - 1) first.charAt first first.length() - 1 first.length() first.length first 1 for (int i = 0; i < n - 1; i++) {
			String word = sc.next();
			if (!set.add(word) || tail != word.charAt(0)) {
				System.out.println("No");
				sc.close();
				return;
			}
			tail = word.charAt(word.length() - 1);
		} int i = 0; int i = 0; i 0 i < n - 1 i n - 1 n 1 i++ i++ i {
			String word = sc.next();
			if (!set.add(word) || tail != word.charAt(0)) {
				System.out.println("No");
				sc.close();
				return;
			}
			tail = word.charAt(word.length() - 1);
		} {
			String word = sc.next();
			if (!set.add(word) || tail != word.charAt(0)) {
				System.out.println("No");
				sc.close();
				return;
			}
			tail = word.charAt(word.length() - 1);
		} String word = sc.next(); word sc.next() sc.next sc if (!set.add(word) || tail != word.charAt(0)) {
				System.out.println("No");
				sc.close();
				return;
			} !set.add(word) || tail != word.charAt(0) !set.add(word) set.add(word) set.add set word tail != word.charAt(0) tail word.charAt(0) word.charAt word 0 {
				System.out.println("No");
				sc.close();
				return;
			} System.out.println("No") System.out.println System.out System System.out "No" sc.close() sc.close sc return; tail = word.charAt(word.length() - 1) tail 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" 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 = sc.nextInt();
		
		Set<String> set = new HashSet<>();
		String first = sc.next();
		set.add(first);
		
		char tail = first.charAt(first.length() - 1);
		for (int i = 0; i < n - 1; i++) {
			String word = sc.next();
			if (!set.add(word) || tail != word.charAt(0)) {
				System.out.println("No");
				sc.close();
				return;
			}
			tail = word.charAt(word.length() - 1);
		}
		
		System.out.println("Yes");
		
		sc.close();
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		
		Set<String> set = new HashSet<>();
		String first = sc.next();
		set.add(first);
		
		char tail = first.charAt(first.length() - 1);
		for (int i = 0; i < n - 1; i++) {
			String word = sc.next();
			if (!set.add(word) || tail != word.charAt(0)) {
				System.out.println("No");
				sc.close();
				return;
			}
			tail = word.charAt(word.length() - 1);
		}
		
		System.out.println("Yes");
		
		sc.close();
	}
} 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);
		int n = sc.nextInt();
		
		Set<String> set = new HashSet<>();
		String first = sc.next();
		set.add(first);
		
		char tail = first.charAt(first.length() - 1);
		for (int i = 0; i < n - 1; i++) {
			String word = sc.next();
			if (!set.add(word) || tail != word.charAt(0)) {
				System.out.println("No");
				sc.close();
				return;
			}
			tail = word.charAt(word.length() - 1);
		}
		
		System.out.println("Yes");
		
		sc.close();
	}
}


