import java.util.*;
 
public class Main {
	public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	int n = sc.nextInt();
        String s[] = new String[n];
        for(int i = 0; i < n; i++){
        	s[i] = sc.next();
            if(i > 0 &&  !(s[i - 1].substring(s[i - 1].length() - 1).equals(s[i].substring(0,1)))){
            	System.out.println("No");
                return;
            }
            for(int j = 0; j < i; j++){
            	if(s[i].equals(s[j])){
                	System.out.println("No");
                    return;
                }
            }
        }
        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();
        String s[] = new String[n];
        for(int i = 0; i < n; i++){
        	s[i] = sc.next();
            if(i > 0 &&  !(s[i - 1].substring(s[i - 1].length() - 1).equals(s[i].substring(0,1)))){
            	System.out.println("No");
                return;
            }
            for(int j = 0; j < i; j++){
            	if(s[i].equals(s[j])){
                	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();
        String s[] = new String[n];
        for(int i = 0; i < n; i++){
        	s[i] = sc.next();
            if(i > 0 &&  !(s[i - 1].substring(s[i - 1].length() - 1).equals(s[i].substring(0,1)))){
            	System.out.println("No");
                return;
            }
            for(int j = 0; j < i; j++){
            	if(s[i].equals(s[j])){
                	System.out.println("No");
                    return;
                }
            }
        }
        System.out.println("Yes");
    } main {
    	Scanner sc = new Scanner(System.in);
    	int n = sc.nextInt();
        String s[] = new String[n];
        for(int i = 0; i < n; i++){
        	s[i] = sc.next();
            if(i > 0 &&  !(s[i - 1].substring(s[i - 1].length() - 1).equals(s[i].substring(0,1)))){
            	System.out.println("No");
                return;
            }
            for(int j = 0; j < i; j++){
            	if(s[i].equals(s[j])){
                	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 String s[] = new String[n]; s new String[n] n for(int i = 0; i < n; i++){
        	s[i] = sc.next();
            if(i > 0 &&  !(s[i - 1].substring(s[i - 1].length() - 1).equals(s[i].substring(0,1)))){
            	System.out.println("No");
                return;
            }
            for(int j = 0; j < i; j++){
            	if(s[i].equals(s[j])){
                	System.out.println("No");
                    return;
                }
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
        	s[i] = sc.next();
            if(i > 0 &&  !(s[i - 1].substring(s[i - 1].length() - 1).equals(s[i].substring(0,1)))){
            	System.out.println("No");
                return;
            }
            for(int j = 0; j < i; j++){
            	if(s[i].equals(s[j])){
                	System.out.println("No");
                    return;
                }
            }
        } {
        	s[i] = sc.next();
            if(i > 0 &&  !(s[i - 1].substring(s[i - 1].length() - 1).equals(s[i].substring(0,1)))){
            	System.out.println("No");
                return;
            }
            for(int j = 0; j < i; j++){
            	if(s[i].equals(s[j])){
                	System.out.println("No");
                    return;
                }
            }
        } s[i] = sc.next() s[i] s i sc.next() sc.next sc if(i > 0 &&  !(s[i - 1].substring(s[i - 1].length() - 1).equals(s[i].substring(0,1)))){
            	System.out.println("No");
                return;
            } i > 0 &&  !(s[i - 1].substring(s[i - 1].length() - 1).equals(s[i].substring(0,1))) i > 0 i 0 !(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 {
            	System.out.println("No");
                return;
            } System.out.println("No") System.out.println System.out System System.out "No" return; for(int j = 0; j < i; j++){
            	if(s[i].equals(s[j])){
                	System.out.println("No");
                    return;
                }
            } int j = 0; int j = 0; j 0 j < i j i j++ j++ j {
            	if(s[i].equals(s[j])){
                	System.out.println("No");
                    return;
                }
            } {
            	if(s[i].equals(s[j])){
                	System.out.println("No");
                    return;
                }
            } if(s[i].equals(s[j])){
                	System.out.println("No");
                    return;
                } s[i].equals(s[j]) s[i].equals s[i] s i s[j] s j {
                	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();
        String s[] = new String[n];
        for(int i = 0; i < n; i++){
        	s[i] = sc.next();
            if(i > 0 &&  !(s[i - 1].substring(s[i - 1].length() - 1).equals(s[i].substring(0,1)))){
            	System.out.println("No");
                return;
            }
            for(int j = 0; j < i; j++){
            	if(s[i].equals(s[j])){
                	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();
        String s[] = new String[n];
        for(int i = 0; i < n; i++){
        	s[i] = sc.next();
            if(i > 0 &&  !(s[i - 1].substring(s[i - 1].length() - 1).equals(s[i].substring(0,1)))){
            	System.out.println("No");
                return;
            }
            for(int j = 0; j < i; j++){
            	if(s[i].equals(s[j])){
                	System.out.println("No");
                    return;
                }
            }
        }
        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();
        String s[] = new String[n];
        for(int i = 0; i < n; i++){
        	s[i] = sc.next();
            if(i > 0 &&  !(s[i - 1].substring(s[i - 1].length() - 1).equals(s[i].substring(0,1)))){
            	System.out.println("No");
                return;
            }
            for(int j = 0; j < i; j++){
            	if(s[i].equals(s[j])){
                	System.out.println("No");
                    return;
                }
            }
        }
        System.out.println("Yes");
    }
}