import java.util.ArrayList;
import java.util.Scanner;

public class Main {


	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();

		ArrayList<String> word = new ArrayList<String>();

		for(int i = 0; i < n; i++) {
			word.add(sc.next());
		}

		for(String wordContain1:  word) {
			int count = 0;
			for(String wordContain2 : word) {
				if(wordContain1.equals(wordContain2)){
					count++;
				}
			}
			if(count > 1) {
				System.out.println("No");
				return;
			}
		}

		for(int i = 0; i < n - 1; i++) {
			String str1 = word.get(i);
			String str2 = word.get(i + 1);

			String str1l = str1.substring(str1.length() - 1);
			String str2f = str2.substring(0,1);

			if(!(str1l.equals(str2f))) {
				System.out.println("No");
				return;
			}
		}

		System.out.println("Yes");


	}
} import java.util.ArrayList; ArrayList java.util import java.util.Scanner; Scanner java.util public class Main {


	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();

		ArrayList<String> word = new ArrayList<String>();

		for(int i = 0; i < n; i++) {
			word.add(sc.next());
		}

		for(String wordContain1:  word) {
			int count = 0;
			for(String wordContain2 : word) {
				if(wordContain1.equals(wordContain2)){
					count++;
				}
			}
			if(count > 1) {
				System.out.println("No");
				return;
			}
		}

		for(int i = 0; i < n - 1; i++) {
			String str1 = word.get(i);
			String str2 = word.get(i + 1);

			String str1l = str1.substring(str1.length() - 1);
			String str2f = str2.substring(0,1);

			if(!(str1l.equals(str2f))) {
				System.out.println("No");
				return;
			}
		}

		System.out.println("Yes");


	}
} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();

		ArrayList<String> word = new ArrayList<String>();

		for(int i = 0; i < n; i++) {
			word.add(sc.next());
		}

		for(String wordContain1:  word) {
			int count = 0;
			for(String wordContain2 : word) {
				if(wordContain1.equals(wordContain2)){
					count++;
				}
			}
			if(count > 1) {
				System.out.println("No");
				return;
			}
		}

		for(int i = 0; i < n - 1; i++) {
			String str1 = word.get(i);
			String str2 = word.get(i + 1);

			String str1l = str1.substring(str1.length() - 1);
			String str2f = str2.substring(0,1);

			if(!(str1l.equals(str2f))) {
				System.out.println("No");
				return;
			}
		}

		System.out.println("Yes");


	} main {

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();

		ArrayList<String> word = new ArrayList<String>();

		for(int i = 0; i < n; i++) {
			word.add(sc.next());
		}

		for(String wordContain1:  word) {
			int count = 0;
			for(String wordContain2 : word) {
				if(wordContain1.equals(wordContain2)){
					count++;
				}
			}
			if(count > 1) {
				System.out.println("No");
				return;
			}
		}

		for(int i = 0; i < n - 1; i++) {
			String str1 = word.get(i);
			String str2 = word.get(i + 1);

			String str1l = str1.substring(str1.length() - 1);
			String str2f = str2.substring(0,1);

			if(!(str1l.equals(str2f))) {
				System.out.println("No");
				return;
			}
		}

		System.out.println("Yes");


	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc ArrayList<String> word = new ArrayList<String>(); word new ArrayList<String>() for(int i = 0; i < n; i++) {
			word.add(sc.next());
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			word.add(sc.next());
		} {
			word.add(sc.next());
		} word.add(sc.next()) word.add word sc.next() sc.next sc for(String wordContain1:  word) {
			int count = 0;
			for(String wordContain2 : word) {
				if(wordContain1.equals(wordContain2)){
					count++;
				}
			}
			if(count > 1) {
				System.out.println("No");
				return;
			}
		} String wordContain1 word {
			int count = 0;
			for(String wordContain2 : word) {
				if(wordContain1.equals(wordContain2)){
					count++;
				}
			}
			if(count > 1) {
				System.out.println("No");
				return;
			}
		} {
			int count = 0;
			for(String wordContain2 : word) {
				if(wordContain1.equals(wordContain2)){
					count++;
				}
			}
			if(count > 1) {
				System.out.println("No");
				return;
			}
		} int count = 0; count 0 for(String wordContain2 : word) {
				if(wordContain1.equals(wordContain2)){
					count++;
				}
			} String wordContain2 word {
				if(wordContain1.equals(wordContain2)){
					count++;
				}
			} {
				if(wordContain1.equals(wordContain2)){
					count++;
				}
			} if(wordContain1.equals(wordContain2)){
					count++;
				} wordContain1.equals(wordContain2) wordContain1.equals wordContain1 wordContain2 {
					count++;
				} count++ count if(count > 1) {
				System.out.println("No");
				return;
			} count > 1 count 1 {
				System.out.println("No");
				return;
			} System.out.println("No") System.out.println System.out System System.out "No" return; for(int i = 0; i < n - 1; i++) {
			String str1 = word.get(i);
			String str2 = word.get(i + 1);

			String str1l = str1.substring(str1.length() - 1);
			String str2f = str2.substring(0,1);

			if(!(str1l.equals(str2f))) {
				System.out.println("No");
				return;
			}
		} int i = 0; int i = 0; i 0 i < n - 1 i n - 1 n 1 i++ i++ i {
			String str1 = word.get(i);
			String str2 = word.get(i + 1);

			String str1l = str1.substring(str1.length() - 1);
			String str2f = str2.substring(0,1);

			if(!(str1l.equals(str2f))) {
				System.out.println("No");
				return;
			}
		} {
			String str1 = word.get(i);
			String str2 = word.get(i + 1);

			String str1l = str1.substring(str1.length() - 1);
			String str2f = str2.substring(0,1);

			if(!(str1l.equals(str2f))) {
				System.out.println("No");
				return;
			}
		} String str1 = word.get(i); str1 word.get(i) word.get word i String str2 = word.get(i + 1); str2 word.get(i + 1) word.get word i + 1 i 1 String str1l = str1.substring(str1.length() - 1); str1l str1.substring(str1.length() - 1) str1.substring str1 str1.length() - 1 str1.length() str1.length str1 1 String str2f = str2.substring(0,1); str2f str2.substring(0,1) str2.substring str2 0 1 if(!(str1l.equals(str2f))) {
				System.out.println("No");
				return;
			} !(str1l.equals(str2f)) (str1l.equals(str2f)) str1l.equals str1l str2f {
				System.out.println("No");
				return;
			} System.out.println("No") System.out.println System.out System System.out "No" return; 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 n = sc.nextInt();

		ArrayList<String> word = new ArrayList<String>();

		for(int i = 0; i < n; i++) {
			word.add(sc.next());
		}

		for(String wordContain1:  word) {
			int count = 0;
			for(String wordContain2 : word) {
				if(wordContain1.equals(wordContain2)){
					count++;
				}
			}
			if(count > 1) {
				System.out.println("No");
				return;
			}
		}

		for(int i = 0; i < n - 1; i++) {
			String str1 = word.get(i);
			String str2 = word.get(i + 1);

			String str1l = str1.substring(str1.length() - 1);
			String str2f = str2.substring(0,1);

			if(!(str1l.equals(str2f))) {
				System.out.println("No");
				return;
			}
		}

		System.out.println("Yes");


	}
} public class Main {


	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();

		ArrayList<String> word = new ArrayList<String>();

		for(int i = 0; i < n; i++) {
			word.add(sc.next());
		}

		for(String wordContain1:  word) {
			int count = 0;
			for(String wordContain2 : word) {
				if(wordContain1.equals(wordContain2)){
					count++;
				}
			}
			if(count > 1) {
				System.out.println("No");
				return;
			}
		}

		for(int i = 0; i < n - 1; i++) {
			String str1 = word.get(i);
			String str2 = word.get(i + 1);

			String str1l = str1.substring(str1.length() - 1);
			String str2f = str2.substring(0,1);

			if(!(str1l.equals(str2f))) {
				System.out.println("No");
				return;
			}
		}

		System.out.println("Yes");


	}
} Main
import java.util.ArrayList;
import java.util.Scanner;

public class Main {


	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();

		ArrayList<String> word = new ArrayList<String>();

		for(int i = 0; i < n; i++) {
			word.add(sc.next());
		}

		for(String wordContain1:  word) {
			int count = 0;
			for(String wordContain2 : word) {
				if(wordContain1.equals(wordContain2)){
					count++;
				}
			}
			if(count > 1) {
				System.out.println("No");
				return;
			}
		}

		for(int i = 0; i < n - 1; i++) {
			String str1 = word.get(i);
			String str2 = word.get(i + 1);

			String str1l = str1.substring(str1.length() - 1);
			String str2f = str2.substring(0,1);

			if(!(str1l.equals(str2f))) {
				System.out.println("No");
				return;
			}
		}

		System.out.println("Yes");


	}
}