import java.util.*;
import java.lang.Math;

public class Main {
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        String[] words = new String[n];

        boolean ans = true;

        for (int i = 0; i < n; i++) {
            words[i] = sc.next();
            for (int j = 0; j < i; j++) {
                if (words[j].equals(words[i])) {
                    ans = false;
                    break;
                }
            }

            if (i > 0) {
                char a = words[i].charAt(0);
                char b = words[i - 1].charAt(words[i - 1].length() - 1);

                if (a != b) {
                    ans = false;
                    //System.out.println("---");
                    //System.out.println(i + ", " + a + ", " + b);
                }
            }
            if (!ans) {
                break;
            }
        }
        System.out.println(ans ? "Yes":"No");
    }
} import java.util.*; util.* java import java.lang.Math; Math java.lang public class Main {
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        String[] words = new String[n];

        boolean ans = true;

        for (int i = 0; i < n; i++) {
            words[i] = sc.next();
            for (int j = 0; j < i; j++) {
                if (words[j].equals(words[i])) {
                    ans = false;
                    break;
                }
            }

            if (i > 0) {
                char a = words[i].charAt(0);
                char b = words[i - 1].charAt(words[i - 1].length() - 1);

                if (a != b) {
                    ans = false;
                    //System.out.println("---");
                    //System.out.println(i + ", " + a + ", " + b);
                }
            }
            if (!ans) {
                break;
            }
        }
        System.out.println(ans ? "Yes":"No");
    }
} Main public static void main(String args[]){
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        String[] words = new String[n];

        boolean ans = true;

        for (int i = 0; i < n; i++) {
            words[i] = sc.next();
            for (int j = 0; j < i; j++) {
                if (words[j].equals(words[i])) {
                    ans = false;
                    break;
                }
            }

            if (i > 0) {
                char a = words[i].charAt(0);
                char b = words[i - 1].charAt(words[i - 1].length() - 1);

                if (a != b) {
                    ans = false;
                    //System.out.println("---");
                    //System.out.println(i + ", " + a + ", " + b);
                }
            }
            if (!ans) {
                break;
            }
        }
        System.out.println(ans ? "Yes":"No");
    } main {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        String[] words = new String[n];

        boolean ans = true;

        for (int i = 0; i < n; i++) {
            words[i] = sc.next();
            for (int j = 0; j < i; j++) {
                if (words[j].equals(words[i])) {
                    ans = false;
                    break;
                }
            }

            if (i > 0) {
                char a = words[i].charAt(0);
                char b = words[i - 1].charAt(words[i - 1].length() - 1);

                if (a != b) {
                    ans = false;
                    //System.out.println("---");
                    //System.out.println(i + ", " + a + ", " + b);
                }
            }
            if (!ans) {
                break;
            }
        }
        System.out.println(ans ? "Yes":"No");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc String[] words = new String[n]; words new String[n] n boolean ans = true; ans true for (int i = 0; i < n; i++) {
            words[i] = sc.next();
            for (int j = 0; j < i; j++) {
                if (words[j].equals(words[i])) {
                    ans = false;
                    break;
                }
            }

            if (i > 0) {
                char a = words[i].charAt(0);
                char b = words[i - 1].charAt(words[i - 1].length() - 1);

                if (a != b) {
                    ans = false;
                    //System.out.println("---");
                    //System.out.println(i + ", " + a + ", " + b);
                }
            }
            if (!ans) {
                break;
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            words[i] = sc.next();
            for (int j = 0; j < i; j++) {
                if (words[j].equals(words[i])) {
                    ans = false;
                    break;
                }
            }

            if (i > 0) {
                char a = words[i].charAt(0);
                char b = words[i - 1].charAt(words[i - 1].length() - 1);

                if (a != b) {
                    ans = false;
                    //System.out.println("---");
                    //System.out.println(i + ", " + a + ", " + b);
                }
            }
            if (!ans) {
                break;
            }
        } {
            words[i] = sc.next();
            for (int j = 0; j < i; j++) {
                if (words[j].equals(words[i])) {
                    ans = false;
                    break;
                }
            }

            if (i > 0) {
                char a = words[i].charAt(0);
                char b = words[i - 1].charAt(words[i - 1].length() - 1);

                if (a != b) {
                    ans = false;
                    //System.out.println("---");
                    //System.out.println(i + ", " + a + ", " + b);
                }
            }
            if (!ans) {
                break;
            }
        } words[i] = sc.next() words[i] words i sc.next() sc.next sc for (int j = 0; j < i; j++) {
                if (words[j].equals(words[i])) {
                    ans = false;
                    break;
                }
            } int j = 0; int j = 0; j 0 j < i j i j++ j++ j {
                if (words[j].equals(words[i])) {
                    ans = false;
                    break;
                }
            } {
                if (words[j].equals(words[i])) {
                    ans = false;
                    break;
                }
            } if (words[j].equals(words[i])) {
                    ans = false;
                    break;
                } words[j].equals(words[i]) words[j].equals words[j] words j words[i] words i {
                    ans = false;
                    break;
                } ans = false ans false break; if (i > 0) {
                char a = words[i].charAt(0);
                char b = words[i - 1].charAt(words[i - 1].length() - 1);

                if (a != b) {
                    ans = false;
                    //System.out.println("---");
                    //System.out.println(i + ", " + a + ", " + b);
                }
            } i > 0 i 0 {
                char a = words[i].charAt(0);
                char b = words[i - 1].charAt(words[i - 1].length() - 1);

                if (a != b) {
                    ans = false;
                    //System.out.println("---");
                    //System.out.println(i + ", " + a + ", " + b);
                }
            } char a = words[i].charAt(0); a words[i].charAt(0) words[i].charAt words[i] words i 0 char b = words[i - 1].charAt(words[i - 1].length() - 1); b words[i - 1].charAt(words[i - 1].length() - 1) words[i - 1].charAt words[i - 1] words i - 1 i 1 words[i - 1].length() - 1 words[i - 1].length() words[i - 1].length words[i - 1] words i - 1 i 1 1 if (a != b) {
                    ans = false;
                    //System.out.println("---");
                    //System.out.println(i + ", " + a + ", " + b);
                } a != b a b {
                    ans = false;
                    //System.out.println("---");
                    //System.out.println(i + ", " + a + ", " + b);
                } ans = false ans false if (!ans) {
                break;
            } !ans ans {
                break;
            } break; System.out.println(ans ? "Yes":"No") System.out.println System.out System System.out ans ? "Yes":"No" ans "Yes" "No" String args[] args public class Main {
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        String[] words = new String[n];

        boolean ans = true;

        for (int i = 0; i < n; i++) {
            words[i] = sc.next();
            for (int j = 0; j < i; j++) {
                if (words[j].equals(words[i])) {
                    ans = false;
                    break;
                }
            }

            if (i > 0) {
                char a = words[i].charAt(0);
                char b = words[i - 1].charAt(words[i - 1].length() - 1);

                if (a != b) {
                    ans = false;
                    //System.out.println("---");
                    //System.out.println(i + ", " + a + ", " + b);
                }
            }
            if (!ans) {
                break;
            }
        }
        System.out.println(ans ? "Yes":"No");
    }
} public class Main {
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        String[] words = new String[n];

        boolean ans = true;

        for (int i = 0; i < n; i++) {
            words[i] = sc.next();
            for (int j = 0; j < i; j++) {
                if (words[j].equals(words[i])) {
                    ans = false;
                    break;
                }
            }

            if (i > 0) {
                char a = words[i].charAt(0);
                char b = words[i - 1].charAt(words[i - 1].length() - 1);

                if (a != b) {
                    ans = false;
                    //System.out.println("---");
                    //System.out.println(i + ", " + a + ", " + b);
                }
            }
            if (!ans) {
                break;
            }
        }
        System.out.println(ans ? "Yes":"No");
    }
} Main
import java.util.*;
import java.lang.Math;

public class Main {
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        String[] words = new String[n];

        boolean ans = true;

        for (int i = 0; i < n; i++) {
            words[i] = sc.next();
            for (int j = 0; j < i; j++) {
                if (words[j].equals(words[i])) {
                    ans = false;
                    break;
                }
            }

            if (i > 0) {
                char a = words[i].charAt(0);
                char b = words[i - 1].charAt(words[i - 1].length() - 1);

                if (a != b) {
                    ans = false;
                    //System.out.println("---");
                    //System.out.println(i + ", " + a + ", " + b);
                }
            }
            if (!ans) {
                break;
            }
        }
        System.out.println(ans ? "Yes":"No");
    }
}
