import java.util.Scanner;
import java.util.Set;
import java.util.HashSet;
public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();

		Set<String> found = new HashSet<String>();
		String prevWord = sc.nextLine();

		boolean good = true;
		for(int i = 0; i < n; i++){
			String currWord = sc.nextLine();
			if(i != 0 && currWord.charAt(0) != prevWord.charAt(prevWord.length() - 1)){
				good = false;
			}
			if(found.contains(currWord)){
				good = false;
			}
			found.add(currWord);
			prevWord = currWord;
		}

		if(good){
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} import java.util.Scanner; Scanner java.util import java.util.Set; Set java.util import java.util.HashSet; HashSet java.util public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();

		Set<String> found = new HashSet<String>();
		String prevWord = sc.nextLine();

		boolean good = true;
		for(int i = 0; i < n; i++){
			String currWord = sc.nextLine();
			if(i != 0 && currWord.charAt(0) != prevWord.charAt(prevWord.length() - 1)){
				good = false;
			}
			if(found.contains(currWord)){
				good = false;
			}
			found.add(currWord);
			prevWord = currWord;
		}

		if(good){
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} Main public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();

		Set<String> found = new HashSet<String>();
		String prevWord = sc.nextLine();

		boolean good = true;
		for(int i = 0; i < n; i++){
			String currWord = sc.nextLine();
			if(i != 0 && currWord.charAt(0) != prevWord.charAt(prevWord.length() - 1)){
				good = false;
			}
			if(found.contains(currWord)){
				good = false;
			}
			found.add(currWord);
			prevWord = currWord;
		}

		if(good){
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();

		Set<String> found = new HashSet<String>();
		String prevWord = sc.nextLine();

		boolean good = true;
		for(int i = 0; i < n; i++){
			String currWord = sc.nextLine();
			if(i != 0 && currWord.charAt(0) != prevWord.charAt(prevWord.length() - 1)){
				good = false;
			}
			if(found.contains(currWord)){
				good = false;
			}
			found.add(currWord);
			prevWord = currWord;
		}

		if(good){
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc Set<String> found = new HashSet<String>(); found new HashSet<String>() String prevWord = sc.nextLine(); prevWord sc.nextLine() sc.nextLine sc boolean good = true; good true for(int i = 0; i < n; i++){
			String currWord = sc.nextLine();
			if(i != 0 && currWord.charAt(0) != prevWord.charAt(prevWord.length() - 1)){
				good = false;
			}
			if(found.contains(currWord)){
				good = false;
			}
			found.add(currWord);
			prevWord = currWord;
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			String currWord = sc.nextLine();
			if(i != 0 && currWord.charAt(0) != prevWord.charAt(prevWord.length() - 1)){
				good = false;
			}
			if(found.contains(currWord)){
				good = false;
			}
			found.add(currWord);
			prevWord = currWord;
		} {
			String currWord = sc.nextLine();
			if(i != 0 && currWord.charAt(0) != prevWord.charAt(prevWord.length() - 1)){
				good = false;
			}
			if(found.contains(currWord)){
				good = false;
			}
			found.add(currWord);
			prevWord = currWord;
		} String currWord = sc.nextLine(); currWord sc.nextLine() sc.nextLine sc if(i != 0 && currWord.charAt(0) != prevWord.charAt(prevWord.length() - 1)){
				good = false;
			} i != 0 && currWord.charAt(0) != prevWord.charAt(prevWord.length() - 1) i != 0 i 0 currWord.charAt(0) != prevWord.charAt(prevWord.length() - 1) currWord.charAt(0) currWord.charAt currWord 0 prevWord.charAt(prevWord.length() - 1) prevWord.charAt prevWord prevWord.length() - 1 prevWord.length() prevWord.length prevWord 1 {
				good = false;
			} good = false good false if(found.contains(currWord)){
				good = false;
			} found.contains(currWord) found.contains found currWord {
				good = false;
			} good = false good false found.add(currWord) found.add found currWord prevWord = currWord prevWord currWord if(good){
			System.out.println("Yes");
		} else {
			System.out.println("No");
		} good {
			System.out.println("Yes");
		} System.out.println("Yes") System.out.println System.out System System.out "Yes" {
			System.out.println("No");
		} System.out.println("No") System.out.println System.out System System.out "No" String[] args args public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();

		Set<String> found = new HashSet<String>();
		String prevWord = sc.nextLine();

		boolean good = true;
		for(int i = 0; i < n; i++){
			String currWord = sc.nextLine();
			if(i != 0 && currWord.charAt(0) != prevWord.charAt(prevWord.length() - 1)){
				good = false;
			}
			if(found.contains(currWord)){
				good = false;
			}
			found.add(currWord);
			prevWord = currWord;
		}

		if(good){
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();

		Set<String> found = new HashSet<String>();
		String prevWord = sc.nextLine();

		boolean good = true;
		for(int i = 0; i < n; i++){
			String currWord = sc.nextLine();
			if(i != 0 && currWord.charAt(0) != prevWord.charAt(prevWord.length() - 1)){
				good = false;
			}
			if(found.contains(currWord)){
				good = false;
			}
			found.add(currWord);
			prevWord = currWord;
		}

		if(good){
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} Main
import java.util.Scanner;
import java.util.Set;
import java.util.HashSet;
public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();

		Set<String> found = new HashSet<String>();
		String prevWord = sc.nextLine();

		boolean good = true;
		for(int i = 0; i < n; i++){
			String currWord = sc.nextLine();
			if(i != 0 && currWord.charAt(0) != prevWord.charAt(prevWord.length() - 1)){
				good = false;
			}
			if(found.contains(currWord)){
				good = false;
			}
			found.add(currWord);
			prevWord = currWord;
		}

		if(good){
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
}