import java.util.LinkedHashSet;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		LinkedHashSet<String> set = new LinkedHashSet<>();
		
		int num = scan.nextInt();
		
		for(int i = 0; i < num; i++) {
			String word = scan.next();
			set.add(word);
		}
		
		if(set.size() != num) {
			System.out.println("No");
			return;
		}
		
		String pword = "";
		for(String word : set) {
			if("".equals(pword)) {
				pword = word;
				continue;
			}
			
			if(!pword.endsWith(word.substring(0, 1))) {
				System.out.println("No");
				return;
			}
			pword = word;
		}
		System.out.println("Yes");
	}
} import java.util.LinkedHashSet; LinkedHashSet java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		LinkedHashSet<String> set = new LinkedHashSet<>();
		
		int num = scan.nextInt();
		
		for(int i = 0; i < num; i++) {
			String word = scan.next();
			set.add(word);
		}
		
		if(set.size() != num) {
			System.out.println("No");
			return;
		}
		
		String pword = "";
		for(String word : set) {
			if("".equals(pword)) {
				pword = word;
				continue;
			}
			
			if(!pword.endsWith(word.substring(0, 1))) {
				System.out.println("No");
				return;
			}
			pword = word;
		}
		System.out.println("Yes");
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		LinkedHashSet<String> set = new LinkedHashSet<>();
		
		int num = scan.nextInt();
		
		for(int i = 0; i < num; i++) {
			String word = scan.next();
			set.add(word);
		}
		
		if(set.size() != num) {
			System.out.println("No");
			return;
		}
		
		String pword = "";
		for(String word : set) {
			if("".equals(pword)) {
				pword = word;
				continue;
			}
			
			if(!pword.endsWith(word.substring(0, 1))) {
				System.out.println("No");
				return;
			}
			pword = word;
		}
		System.out.println("Yes");
	} main {
		Scanner scan = new Scanner(System.in);
		LinkedHashSet<String> set = new LinkedHashSet<>();
		
		int num = scan.nextInt();
		
		for(int i = 0; i < num; i++) {
			String word = scan.next();
			set.add(word);
		}
		
		if(set.size() != num) {
			System.out.println("No");
			return;
		}
		
		String pword = "";
		for(String word : set) {
			if("".equals(pword)) {
				pword = word;
				continue;
			}
			
			if(!pword.endsWith(word.substring(0, 1))) {
				System.out.println("No");
				return;
			}
			pword = word;
		}
		System.out.println("Yes");
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) LinkedHashSet<String> set = new LinkedHashSet<>(); set new LinkedHashSet<>() int num = scan.nextInt(); num scan.nextInt() scan.nextInt scan for(int i = 0; i < num; i++) {
			String word = scan.next();
			set.add(word);
		} int i = 0; int i = 0; i 0 i < num i num i++ i++ i {
			String word = scan.next();
			set.add(word);
		} {
			String word = scan.next();
			set.add(word);
		} String word = scan.next(); word scan.next() scan.next scan set.add(word) set.add set word if(set.size() != num) {
			System.out.println("No");
			return;
		} set.size() != num set.size() set.size set num {
			System.out.println("No");
			return;
		} System.out.println("No") System.out.println System.out System System.out "No" return; String pword = ""; pword "" for(String word : set) {
			if("".equals(pword)) {
				pword = word;
				continue;
			}
			
			if(!pword.endsWith(word.substring(0, 1))) {
				System.out.println("No");
				return;
			}
			pword = word;
		} String word set {
			if("".equals(pword)) {
				pword = word;
				continue;
			}
			
			if(!pword.endsWith(word.substring(0, 1))) {
				System.out.println("No");
				return;
			}
			pword = word;
		} {
			if("".equals(pword)) {
				pword = word;
				continue;
			}
			
			if(!pword.endsWith(word.substring(0, 1))) {
				System.out.println("No");
				return;
			}
			pword = word;
		} if("".equals(pword)) {
				pword = word;
				continue;
			} "".equals(pword) "".equals "" pword {
				pword = word;
				continue;
			} pword = word pword word continue; if(!pword.endsWith(word.substring(0, 1))) {
				System.out.println("No");
				return;
			} !pword.endsWith(word.substring(0, 1)) pword.endsWith(word.substring(0, 1)) pword.endsWith pword word.substring(0, 1) word.substring word 0 1 {
				System.out.println("No");
				return;
			} System.out.println("No") System.out.println System.out System System.out "No" return; pword = word pword word 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 scan = new Scanner(System.in);
		LinkedHashSet<String> set = new LinkedHashSet<>();
		
		int num = scan.nextInt();
		
		for(int i = 0; i < num; i++) {
			String word = scan.next();
			set.add(word);
		}
		
		if(set.size() != num) {
			System.out.println("No");
			return;
		}
		
		String pword = "";
		for(String word : set) {
			if("".equals(pword)) {
				pword = word;
				continue;
			}
			
			if(!pword.endsWith(word.substring(0, 1))) {
				System.out.println("No");
				return;
			}
			pword = word;
		}
		System.out.println("Yes");
	}
} public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		LinkedHashSet<String> set = new LinkedHashSet<>();
		
		int num = scan.nextInt();
		
		for(int i = 0; i < num; i++) {
			String word = scan.next();
			set.add(word);
		}
		
		if(set.size() != num) {
			System.out.println("No");
			return;
		}
		
		String pword = "";
		for(String word : set) {
			if("".equals(pword)) {
				pword = word;
				continue;
			}
			
			if(!pword.endsWith(word.substring(0, 1))) {
				System.out.println("No");
				return;
			}
			pword = word;
		}
		System.out.println("Yes");
	}
} Main
import java.util.LinkedHashSet;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		LinkedHashSet<String> set = new LinkedHashSet<>();
		
		int num = scan.nextInt();
		
		for(int i = 0; i < num; i++) {
			String word = scan.next();
			set.add(word);
		}
		
		if(set.size() != num) {
			System.out.println("No");
			return;
		}
		
		String pword = "";
		for(String word : set) {
			if("".equals(pword)) {
				pword = word;
				continue;
			}
			
			if(!pword.endsWith(word.substring(0, 1))) {
				System.out.println("No");
				return;
			}
			pword = word;
		}
		System.out.println("Yes");
	}
}
