import java.util.*;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in); 
		int n = sc.nextInt();
		boolean flg = true;
		String[] s = new String[n];
		for(int i = 0;i < n;i++) {
			String S = sc.next();
			if(Arrays.asList(s).contains(S)) flg = false;
			s[i] = S;
		}
		for(int i = 1;i < n;i++) {
			if(!(s[i-1].substring(s[i-1].length()-1).equals(s[i].substring(0,1)))) flg = false;
		}
		System.out.println(flg ? "Yes" : "No");
        sc.close();
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in); 
		int n = sc.nextInt();
		boolean flg = true;
		String[] s = new String[n];
		for(int i = 0;i < n;i++) {
			String S = sc.next();
			if(Arrays.asList(s).contains(S)) flg = false;
			s[i] = S;
		}
		for(int i = 1;i < n;i++) {
			if(!(s[i-1].substring(s[i-1].length()-1).equals(s[i].substring(0,1)))) flg = false;
		}
		System.out.println(flg ? "Yes" : "No");
        sc.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in); 
		int n = sc.nextInt();
		boolean flg = true;
		String[] s = new String[n];
		for(int i = 0;i < n;i++) {
			String S = sc.next();
			if(Arrays.asList(s).contains(S)) flg = false;
			s[i] = S;
		}
		for(int i = 1;i < n;i++) {
			if(!(s[i-1].substring(s[i-1].length()-1).equals(s[i].substring(0,1)))) flg = false;
		}
		System.out.println(flg ? "Yes" : "No");
        sc.close();
	} main {
		Scanner sc = new Scanner(System.in); 
		int n = sc.nextInt();
		boolean flg = true;
		String[] s = new String[n];
		for(int i = 0;i < n;i++) {
			String S = sc.next();
			if(Arrays.asList(s).contains(S)) flg = false;
			s[i] = S;
		}
		for(int i = 1;i < n;i++) {
			if(!(s[i-1].substring(s[i-1].length()-1).equals(s[i].substring(0,1)))) flg = false;
		}
		System.out.println(flg ? "Yes" : "No");
        sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc boolean flg = true; flg true String[] s = new String[n]; s new String[n] n for(int i = 0;i < n;i++) {
			String S = sc.next();
			if(Arrays.asList(s).contains(S)) flg = false;
			s[i] = S;
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			String S = sc.next();
			if(Arrays.asList(s).contains(S)) flg = false;
			s[i] = S;
		} {
			String S = sc.next();
			if(Arrays.asList(s).contains(S)) flg = false;
			s[i] = S;
		} String S = sc.next(); S sc.next() sc.next sc if(Arrays.asList(s).contains(S)) flg = false; Arrays.asList(s).contains(S) Arrays.asList(s).contains Arrays.asList(s) Arrays.asList Arrays s S flg = false flg false s[i] = S s[i] s i S for(int i = 1;i < n;i++) {
			if(!(s[i-1].substring(s[i-1].length()-1).equals(s[i].substring(0,1)))) flg = false;
		} int i = 1; int i = 1; i 1 i < n i n i++ i++ i {
			if(!(s[i-1].substring(s[i-1].length()-1).equals(s[i].substring(0,1)))) flg = false;
		} {
			if(!(s[i-1].substring(s[i-1].length()-1).equals(s[i].substring(0,1)))) flg = false;
		} if(!(s[i-1].substring(s[i-1].length()-1).equals(s[i].substring(0,1)))) flg = false; !(s[i-1].substring(s[i-1].length()-1).equals(s[i].substring(0,1))) (s[i-1].substring(s[i-1].length()-1).equals(s[i].substring(0,1))) s[i-1].substring(s[i-1].length()-1).equals s[i-1].substring(s[i-1].length()-1) s[i-1].substring s[i-1] s i-1 i 1 s[i-1].length()-1 s[i-1].length() s[i-1].length s[i-1] s i-1 i 1 1 s[i].substring(0,1) s[i].substring s[i] s i 0 1 flg = false flg false System.out.println(flg ? "Yes" : "No") System.out.println System.out System System.out flg ? "Yes" : "No" flg "Yes" "No" 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();
		boolean flg = true;
		String[] s = new String[n];
		for(int i = 0;i < n;i++) {
			String S = sc.next();
			if(Arrays.asList(s).contains(S)) flg = false;
			s[i] = S;
		}
		for(int i = 1;i < n;i++) {
			if(!(s[i-1].substring(s[i-1].length()-1).equals(s[i].substring(0,1)))) flg = false;
		}
		System.out.println(flg ? "Yes" : "No");
        sc.close();
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in); 
		int n = sc.nextInt();
		boolean flg = true;
		String[] s = new String[n];
		for(int i = 0;i < n;i++) {
			String S = sc.next();
			if(Arrays.asList(s).contains(S)) flg = false;
			s[i] = S;
		}
		for(int i = 1;i < n;i++) {
			if(!(s[i-1].substring(s[i-1].length()-1).equals(s[i].substring(0,1)))) flg = false;
		}
		System.out.println(flg ? "Yes" : "No");
        sc.close();
	}
} Main
import java.util.*;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in); 
		int n = sc.nextInt();
		boolean flg = true;
		String[] s = new String[n];
		for(int i = 0;i < n;i++) {
			String S = sc.next();
			if(Arrays.asList(s).contains(S)) flg = false;
			s[i] = S;
		}
		for(int i = 1;i < n;i++) {
			if(!(s[i-1].substring(s[i-1].length()-1).equals(s[i].substring(0,1)))) flg = false;
		}
		System.out.println(flg ? "Yes" : "No");
        sc.close();
	}
}