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 words[] = new String[N];
      	for(int i=0;i<N;i++){
        	words[i] = sc.next();
        }
      	ArrayList<String> list = new ArrayList<String>();
      	list.add(words[0]);
      	for(int i=0;i<N-1;i++){
        	if(words[i].charAt(words[i].length()-1)!=words[i+1].charAt(0)||list.contains(words[i+1])){
                System.out.println("No");
                flg = false;
                break;
             }else{
                list.add(words[i+1]);
            }
        }
      	if(flg){
        	System.out.println("Yes");
        }
    }
} 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 words[] = new String[N];
      	for(int i=0;i<N;i++){
        	words[i] = sc.next();
        }
      	ArrayList<String> list = new ArrayList<String>();
      	list.add(words[0]);
      	for(int i=0;i<N-1;i++){
        	if(words[i].charAt(words[i].length()-1)!=words[i+1].charAt(0)||list.contains(words[i+1])){
                System.out.println("No");
                flg = false;
                break;
             }else{
                list.add(words[i+1]);
            }
        }
      	if(flg){
        	System.out.println("Yes");
        }
    }
} Main public static void main(String[] args){
      	//データ取り込み
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
      	boolean flg = true;
		String words[] = new String[N];
      	for(int i=0;i<N;i++){
        	words[i] = sc.next();
        }
      	ArrayList<String> list = new ArrayList<String>();
      	list.add(words[0]);
      	for(int i=0;i<N-1;i++){
        	if(words[i].charAt(words[i].length()-1)!=words[i+1].charAt(0)||list.contains(words[i+1])){
                System.out.println("No");
                flg = false;
                break;
             }else{
                list.add(words[i+1]);
            }
        }
      	if(flg){
        	System.out.println("Yes");
        }
    } main {
      	//データ取り込み
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
      	boolean flg = true;
		String words[] = new String[N];
      	for(int i=0;i<N;i++){
        	words[i] = sc.next();
        }
      	ArrayList<String> list = new ArrayList<String>();
      	list.add(words[0]);
      	for(int i=0;i<N-1;i++){
        	if(words[i].charAt(words[i].length()-1)!=words[i+1].charAt(0)||list.contains(words[i+1])){
                System.out.println("No");
                flg = false;
                break;
             }else{
                list.add(words[i+1]);
            }
        }
      	if(flg){
        	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 boolean flg = true; flg true String words[] = new String[N]; words new String[N] N for(int i=0;i<N;i++){
        	words[i] = sc.next();
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
        	words[i] = sc.next();
        } {
        	words[i] = sc.next();
        } words[i] = sc.next() words[i] words i sc.next() sc.next sc ArrayList<String> list = new ArrayList<String>(); list new ArrayList<String>() list.add(words[0]) list.add list words[0] words 0 for(int i=0;i<N-1;i++){
        	if(words[i].charAt(words[i].length()-1)!=words[i+1].charAt(0)||list.contains(words[i+1])){
                System.out.println("No");
                flg = false;
                break;
             }else{
                list.add(words[i+1]);
            }
        } int i=0; int i=0; i 0 i<N-1 i N-1 N 1 i++ i++ i {
        	if(words[i].charAt(words[i].length()-1)!=words[i+1].charAt(0)||list.contains(words[i+1])){
                System.out.println("No");
                flg = false;
                break;
             }else{
                list.add(words[i+1]);
            }
        } {
        	if(words[i].charAt(words[i].length()-1)!=words[i+1].charAt(0)||list.contains(words[i+1])){
                System.out.println("No");
                flg = false;
                break;
             }else{
                list.add(words[i+1]);
            }
        } if(words[i].charAt(words[i].length()-1)!=words[i+1].charAt(0)||list.contains(words[i+1])){
                System.out.println("No");
                flg = false;
                break;
             }else{
                list.add(words[i+1]);
            } words[i].charAt(words[i].length()-1)!=words[i+1].charAt(0)||list.contains(words[i+1]) words[i].charAt(words[i].length()-1)!=words[i+1].charAt(0) words[i].charAt(words[i].length()-1) words[i].charAt words[i] words i words[i].length()-1 words[i].length() words[i].length words[i] words i 1 words[i+1].charAt(0) words[i+1].charAt words[i+1] words i+1 i 1 0 list.contains(words[i+1]) list.contains list words[i+1] words i+1 i 1 {
                System.out.println("No");
                flg = false;
                break;
             } System.out.println("No") System.out.println System.out System System.out "No" flg = false flg false break; {
                list.add(words[i+1]);
            } list.add(words[i+1]) list.add list words[i+1] words i+1 i 1 if(flg){
        	System.out.println("Yes");
        } flg {
        	System.out.println("Yes");
        } 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();
      	boolean flg = true;
		String words[] = new String[N];
      	for(int i=0;i<N;i++){
        	words[i] = sc.next();
        }
      	ArrayList<String> list = new ArrayList<String>();
      	list.add(words[0]);
      	for(int i=0;i<N-1;i++){
        	if(words[i].charAt(words[i].length()-1)!=words[i+1].charAt(0)||list.contains(words[i+1])){
                System.out.println("No");
                flg = false;
                break;
             }else{
                list.add(words[i+1]);
            }
        }
      	if(flg){
        	System.out.println("Yes");
        }
    }
} public class Main {
	public static void main(String[] args){
      	//データ取り込み
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
      	boolean flg = true;
		String words[] = new String[N];
      	for(int i=0;i<N;i++){
        	words[i] = sc.next();
        }
      	ArrayList<String> list = new ArrayList<String>();
      	list.add(words[0]);
      	for(int i=0;i<N-1;i++){
        	if(words[i].charAt(words[i].length()-1)!=words[i+1].charAt(0)||list.contains(words[i+1])){
                System.out.println("No");
                flg = false;
                break;
             }else{
                list.add(words[i+1]);
            }
        }
      	if(flg){
        	System.out.println("Yes");
        }
    }
} 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 words[] = new String[N];
      	for(int i=0;i<N;i++){
        	words[i] = sc.next();
        }
      	ArrayList<String> list = new ArrayList<String>();
      	list.add(words[0]);
      	for(int i=0;i<N-1;i++){
        	if(words[i].charAt(words[i].length()-1)!=words[i+1].charAt(0)||list.contains(words[i+1])){
                System.out.println("No");
                flg = false;
                break;
             }else{
                list.add(words[i+1]);
            }
        }
      	if(flg){
        	System.out.println("Yes");
        }
    }
}