import java.util.*;
import static java.lang.Math.*;
import java.math.BigInteger;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		// 入力
		int n = sc.nextInt();
		ArrayList<String> list = new ArrayList<String>();
		String pre = "";
		String result = "Yes";
	    for(int i = 0; i < n; i++){
	        String now = sc.next();
	        if(i > 0){
	            if(list.contains(now)) result = "No";
	            if(pre.charAt(pre.length()-1) != now.charAt(0)) result = "No";
	        }
	        list.add(now);
	        pre = now;
	    }
		
		// 計算
		
		// 出力
		System.out.println(result);
		
	}
} import java.util.*; util.* java import static java.lang.Math.*; import static java.lang.Math.*; import static java.lang.Math.*; import java.math.BigInteger; BigInteger java.math public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		// 入力
		int n = sc.nextInt();
		ArrayList<String> list = new ArrayList<String>();
		String pre = "";
		String result = "Yes";
	    for(int i = 0; i < n; i++){
	        String now = sc.next();
	        if(i > 0){
	            if(list.contains(now)) result = "No";
	            if(pre.charAt(pre.length()-1) != now.charAt(0)) result = "No";
	        }
	        list.add(now);
	        pre = now;
	    }
		
		// 計算
		
		// 出力
		System.out.println(result);
		
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		// 入力
		int n = sc.nextInt();
		ArrayList<String> list = new ArrayList<String>();
		String pre = "";
		String result = "Yes";
	    for(int i = 0; i < n; i++){
	        String now = sc.next();
	        if(i > 0){
	            if(list.contains(now)) result = "No";
	            if(pre.charAt(pre.length()-1) != now.charAt(0)) result = "No";
	        }
	        list.add(now);
	        pre = now;
	    }
		
		// 計算
		
		// 出力
		System.out.println(result);
		
	} main {
		Scanner sc = new Scanner(System.in);
		
		// 入力
		int n = sc.nextInt();
		ArrayList<String> list = new ArrayList<String>();
		String pre = "";
		String result = "Yes";
	    for(int i = 0; i < n; i++){
	        String now = sc.next();
	        if(i > 0){
	            if(list.contains(now)) result = "No";
	            if(pre.charAt(pre.length()-1) != now.charAt(0)) result = "No";
	        }
	        list.add(now);
	        pre = now;
	    }
		
		// 計算
		
		// 出力
		System.out.println(result);
		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc ArrayList<String> list = new ArrayList<String>(); list new ArrayList<String>() String pre = ""; pre "" String result = "Yes"; result "Yes" for(int i = 0; i < n; i++){
	        String now = sc.next();
	        if(i > 0){
	            if(list.contains(now)) result = "No";
	            if(pre.charAt(pre.length()-1) != now.charAt(0)) result = "No";
	        }
	        list.add(now);
	        pre = now;
	    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
	        String now = sc.next();
	        if(i > 0){
	            if(list.contains(now)) result = "No";
	            if(pre.charAt(pre.length()-1) != now.charAt(0)) result = "No";
	        }
	        list.add(now);
	        pre = now;
	    } {
	        String now = sc.next();
	        if(i > 0){
	            if(list.contains(now)) result = "No";
	            if(pre.charAt(pre.length()-1) != now.charAt(0)) result = "No";
	        }
	        list.add(now);
	        pre = now;
	    } String now = sc.next(); now sc.next() sc.next sc if(i > 0){
	            if(list.contains(now)) result = "No";
	            if(pre.charAt(pre.length()-1) != now.charAt(0)) result = "No";
	        } i > 0 i 0 {
	            if(list.contains(now)) result = "No";
	            if(pre.charAt(pre.length()-1) != now.charAt(0)) result = "No";
	        } if(list.contains(now)) result = "No"; list.contains(now) list.contains list now result = "No" result "No" if(pre.charAt(pre.length()-1) != now.charAt(0)) result = "No"; pre.charAt(pre.length()-1) != now.charAt(0) pre.charAt(pre.length()-1) pre.charAt pre pre.length()-1 pre.length() pre.length pre 1 now.charAt(0) now.charAt now 0 result = "No" result "No" list.add(now) list.add list now pre = now pre now System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		// 入力
		int n = sc.nextInt();
		ArrayList<String> list = new ArrayList<String>();
		String pre = "";
		String result = "Yes";
	    for(int i = 0; i < n; i++){
	        String now = sc.next();
	        if(i > 0){
	            if(list.contains(now)) result = "No";
	            if(pre.charAt(pre.length()-1) != now.charAt(0)) result = "No";
	        }
	        list.add(now);
	        pre = now;
	    }
		
		// 計算
		
		// 出力
		System.out.println(result);
		
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		// 入力
		int n = sc.nextInt();
		ArrayList<String> list = new ArrayList<String>();
		String pre = "";
		String result = "Yes";
	    for(int i = 0; i < n; i++){
	        String now = sc.next();
	        if(i > 0){
	            if(list.contains(now)) result = "No";
	            if(pre.charAt(pre.length()-1) != now.charAt(0)) result = "No";
	        }
	        list.add(now);
	        pre = now;
	    }
		
		// 計算
		
		// 出力
		System.out.println(result);
		
	}
} Main
import java.util.*;
import static java.lang.Math.*;
import java.math.BigInteger;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		// 入力
		int n = sc.nextInt();
		ArrayList<String> list = new ArrayList<String>();
		String pre = "";
		String result = "Yes";
	    for(int i = 0; i < n; i++){
	        String now = sc.next();
	        if(i > 0){
	            if(list.contains(now)) result = "No";
	            if(pre.charAt(pre.length()-1) != now.charAt(0)) result = "No";
	        }
	        list.add(now);
	        pre = now;
	    }
		
		// 計算
		
		// 出力
		System.out.println(result);
		
	}
}
