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