import java.util.*;

public class Main{
	public static void main(String[] args){
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		ArrayList<String> list = new ArrayList<String>();
		int y=0;
		while (scanner.hasNextLine()) {
			String sc = scanner.nextLine();
			y++;
			if(y>=2){
			list.add(sc);
			}
		}
        for (int i = 0; i < list.size() - 1; i++) {
            for (int j = i + 1; j < list.size();) {
                if (list.get(i).equals(list.get(j))){
                    System.out.print("No");
	    	        System.exit(0);
                } else {
                    ++j;
                }
            }
        }
	    char last;
	    char first;
	    String[] list3 = list.toArray(new String[list.size()]);
		for(int k=1;k<list.size();k++){
	    	first = list3[k].charAt(0);
	    	last = list3[k-1].charAt(list3[k-1].length()-1);
	    	if(last!=first){
	    		System.out.print("No");
	    		System.exit(0);
	    	}
		}
        System.out.print("Yes");
	}
}
	     import java.util.*; util.* java public class Main{
	public static void main(String[] args){
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		ArrayList<String> list = new ArrayList<String>();
		int y=0;
		while (scanner.hasNextLine()) {
			String sc = scanner.nextLine();
			y++;
			if(y>=2){
			list.add(sc);
			}
		}
        for (int i = 0; i < list.size() - 1; i++) {
            for (int j = i + 1; j < list.size();) {
                if (list.get(i).equals(list.get(j))){
                    System.out.print("No");
	    	        System.exit(0);
                } else {
                    ++j;
                }
            }
        }
	    char last;
	    char first;
	    String[] list3 = list.toArray(new String[list.size()]);
		for(int k=1;k<list.size();k++){
	    	first = list3[k].charAt(0);
	    	last = list3[k-1].charAt(list3[k-1].length()-1);
	    	if(last!=first){
	    		System.out.print("No");
	    		System.exit(0);
	    	}
		}
        System.out.print("Yes");
	}
} Main public static void main(String[] args){
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		ArrayList<String> list = new ArrayList<String>();
		int y=0;
		while (scanner.hasNextLine()) {
			String sc = scanner.nextLine();
			y++;
			if(y>=2){
			list.add(sc);
			}
		}
        for (int i = 0; i < list.size() - 1; i++) {
            for (int j = i + 1; j < list.size();) {
                if (list.get(i).equals(list.get(j))){
                    System.out.print("No");
	    	        System.exit(0);
                } else {
                    ++j;
                }
            }
        }
	    char last;
	    char first;
	    String[] list3 = list.toArray(new String[list.size()]);
		for(int k=1;k<list.size();k++){
	    	first = list3[k].charAt(0);
	    	last = list3[k-1].charAt(list3[k-1].length()-1);
	    	if(last!=first){
	    		System.out.print("No");
	    		System.exit(0);
	    	}
		}
        System.out.print("Yes");
	} main {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		ArrayList<String> list = new ArrayList<String>();
		int y=0;
		while (scanner.hasNextLine()) {
			String sc = scanner.nextLine();
			y++;
			if(y>=2){
			list.add(sc);
			}
		}
        for (int i = 0; i < list.size() - 1; i++) {
            for (int j = i + 1; j < list.size();) {
                if (list.get(i).equals(list.get(j))){
                    System.out.print("No");
	    	        System.exit(0);
                } else {
                    ++j;
                }
            }
        }
	    char last;
	    char first;
	    String[] list3 = list.toArray(new String[list.size()]);
		for(int k=1;k<list.size();k++){
	    	first = list3[k].charAt(0);
	    	last = list3[k-1].charAt(list3[k-1].length()-1);
	    	if(last!=first){
	    		System.out.print("No");
	    		System.exit(0);
	    	}
		}
        System.out.print("Yes");
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner ArrayList<String> list = new ArrayList<String>(); list new ArrayList<String>() int y=0; y 0 while (scanner.hasNextLine()) {
			String sc = scanner.nextLine();
			y++;
			if(y>=2){
			list.add(sc);
			}
		} scanner.hasNextLine() scanner.hasNextLine scanner {
			String sc = scanner.nextLine();
			y++;
			if(y>=2){
			list.add(sc);
			}
		} String sc = scanner.nextLine(); sc scanner.nextLine() scanner.nextLine scanner y++ y if(y>=2){
			list.add(sc);
			} y>=2 y 2 {
			list.add(sc);
			} list.add(sc) list.add list sc for (int i = 0; i < list.size() - 1; i++) {
            for (int j = i + 1; j < list.size();) {
                if (list.get(i).equals(list.get(j))){
                    System.out.print("No");
	    	        System.exit(0);
                } else {
                    ++j;
                }
            }
        } int i = 0; int i = 0; i 0 i < list.size() - 1 i list.size() - 1 list.size() list.size list 1 i++ i++ i {
            for (int j = i + 1; j < list.size();) {
                if (list.get(i).equals(list.get(j))){
                    System.out.print("No");
	    	        System.exit(0);
                } else {
                    ++j;
                }
            }
        } {
            for (int j = i + 1; j < list.size();) {
                if (list.get(i).equals(list.get(j))){
                    System.out.print("No");
	    	        System.exit(0);
                } else {
                    ++j;
                }
            }
        } for (int j = i + 1; j < list.size();) {
                if (list.get(i).equals(list.get(j))){
                    System.out.print("No");
	    	        System.exit(0);
                } else {
                    ++j;
                }
            } int j = i + 1; int j = i + 1; j i + 1 i 1 j < list.size() j list.size() list.size list {
                if (list.get(i).equals(list.get(j))){
                    System.out.print("No");
	    	        System.exit(0);
                } else {
                    ++j;
                }
            } {
                if (list.get(i).equals(list.get(j))){
                    System.out.print("No");
	    	        System.exit(0);
                } else {
                    ++j;
                }
            } if (list.get(i).equals(list.get(j))){
                    System.out.print("No");
	    	        System.exit(0);
                } else {
                    ++j;
                } list.get(i).equals(list.get(j)) list.get(i).equals list.get(i) list.get list i list.get(j) list.get list j {
                    System.out.print("No");
	    	        System.exit(0);
                } System.out.print("No") System.out.print System.out System System.out "No" System.exit(0) System.exit System 0 {
                    ++j;
                } ++j j char last; last char first; first String[] list3 = list.toArray(new String[list.size()]); list3 list.toArray(new String[list.size()]) list.toArray list new String[list.size()] list.size() list.size list for(int k=1;k<list.size();k++){
	    	first = list3[k].charAt(0);
	    	last = list3[k-1].charAt(list3[k-1].length()-1);
	    	if(last!=first){
	    		System.out.print("No");
	    		System.exit(0);
	    	}
		} int k=1; int k=1; k 1 k<list.size() k list.size() list.size list k++ k++ k {
	    	first = list3[k].charAt(0);
	    	last = list3[k-1].charAt(list3[k-1].length()-1);
	    	if(last!=first){
	    		System.out.print("No");
	    		System.exit(0);
	    	}
		} {
	    	first = list3[k].charAt(0);
	    	last = list3[k-1].charAt(list3[k-1].length()-1);
	    	if(last!=first){
	    		System.out.print("No");
	    		System.exit(0);
	    	}
		} first = list3[k].charAt(0) first list3[k].charAt(0) list3[k].charAt list3[k] list3 k 0 last = list3[k-1].charAt(list3[k-1].length()-1) last list3[k-1].charAt(list3[k-1].length()-1) list3[k-1].charAt list3[k-1] list3 k-1 k 1 list3[k-1].length()-1 list3[k-1].length() list3[k-1].length list3[k-1] list3 k-1 k 1 1 if(last!=first){
	    		System.out.print("No");
	    		System.exit(0);
	    	} last!=first last first {
	    		System.out.print("No");
	    		System.exit(0);
	    	} System.out.print("No") System.out.print System.out System System.out "No" System.exit(0) System.exit System 0 System.out.print("Yes") System.out.print System.out System System.out "Yes" String[] args args public class Main{
	public static void main(String[] args){
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		ArrayList<String> list = new ArrayList<String>();
		int y=0;
		while (scanner.hasNextLine()) {
			String sc = scanner.nextLine();
			y++;
			if(y>=2){
			list.add(sc);
			}
		}
        for (int i = 0; i < list.size() - 1; i++) {
            for (int j = i + 1; j < list.size();) {
                if (list.get(i).equals(list.get(j))){
                    System.out.print("No");
	    	        System.exit(0);
                } else {
                    ++j;
                }
            }
        }
	    char last;
	    char first;
	    String[] list3 = list.toArray(new String[list.size()]);
		for(int k=1;k<list.size();k++){
	    	first = list3[k].charAt(0);
	    	last = list3[k-1].charAt(list3[k-1].length()-1);
	    	if(last!=first){
	    		System.out.print("No");
	    		System.exit(0);
	    	}
		}
        System.out.print("Yes");
	}
} public class Main{
	public static void main(String[] args){
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		ArrayList<String> list = new ArrayList<String>();
		int y=0;
		while (scanner.hasNextLine()) {
			String sc = scanner.nextLine();
			y++;
			if(y>=2){
			list.add(sc);
			}
		}
        for (int i = 0; i < list.size() - 1; i++) {
            for (int j = i + 1; j < list.size();) {
                if (list.get(i).equals(list.get(j))){
                    System.out.print("No");
	    	        System.exit(0);
                } else {
                    ++j;
                }
            }
        }
	    char last;
	    char first;
	    String[] list3 = list.toArray(new String[list.size()]);
		for(int k=1;k<list.size();k++){
	    	first = list3[k].charAt(0);
	    	last = list3[k-1].charAt(list3[k-1].length()-1);
	    	if(last!=first){
	    		System.out.print("No");
	    		System.exit(0);
	    	}
		}
        System.out.print("Yes");
	}
} Main
import java.util.*;

public class Main{
	public static void main(String[] args){
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		ArrayList<String> list = new ArrayList<String>();
		int y=0;
		while (scanner.hasNextLine()) {
			String sc = scanner.nextLine();
			y++;
			if(y>=2){
			list.add(sc);
			}
		}
        for (int i = 0; i < list.size() - 1; i++) {
            for (int j = i + 1; j < list.size();) {
                if (list.get(i).equals(list.get(j))){
                    System.out.print("No");
	    	        System.exit(0);
                } else {
                    ++j;
                }
            }
        }
	    char last;
	    char first;
	    String[] list3 = list.toArray(new String[list.size()]);
		for(int k=1;k<list.size();k++){
	    	first = list3[k].charAt(0);
	    	last = list3[k-1].charAt(list3[k-1].length()-1);
	    	if(last!=first){
	    		System.out.print("No");
	    		System.exit(0);
	    	}
		}
        System.out.print("Yes");
	}
}
	    