
import java.util.*;

class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int input_values = sc.nextInt();
        String values[] = new String[input_values];
        values[0] = sc.next();
        for (int i = 1; i < input_values; i++) {
            
            values[i] = sc.next();
            for (int j = 0; j < i; j++) {
                if (values[j].equals(values[i])) {
                    System.out.println("No");
                    System.exit(0);
                }
            }
            if (values[i - 1].charAt(values[i - 1].length() - 1) != values[i].charAt(0)) {
                System.out.println("No");
                System.exit(0);
            }
        }
        System.out.println("Yes");

    }
} import java.util.*; util.* java class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int input_values = sc.nextInt();
        String values[] = new String[input_values];
        values[0] = sc.next();
        for (int i = 1; i < input_values; i++) {
            
            values[i] = sc.next();
            for (int j = 0; j < i; j++) {
                if (values[j].equals(values[i])) {
                    System.out.println("No");
                    System.exit(0);
                }
            }
            if (values[i - 1].charAt(values[i - 1].length() - 1) != values[i].charAt(0)) {
                System.out.println("No");
                System.exit(0);
            }
        }
        System.out.println("Yes");

    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int input_values = sc.nextInt();
        String values[] = new String[input_values];
        values[0] = sc.next();
        for (int i = 1; i < input_values; i++) {
            
            values[i] = sc.next();
            for (int j = 0; j < i; j++) {
                if (values[j].equals(values[i])) {
                    System.out.println("No");
                    System.exit(0);
                }
            }
            if (values[i - 1].charAt(values[i - 1].length() - 1) != values[i].charAt(0)) {
                System.out.println("No");
                System.exit(0);
            }
        }
        System.out.println("Yes");

    } main {
        Scanner sc = new Scanner(System.in);
        int input_values = sc.nextInt();
        String values[] = new String[input_values];
        values[0] = sc.next();
        for (int i = 1; i < input_values; i++) {
            
            values[i] = sc.next();
            for (int j = 0; j < i; j++) {
                if (values[j].equals(values[i])) {
                    System.out.println("No");
                    System.exit(0);
                }
            }
            if (values[i - 1].charAt(values[i - 1].length() - 1) != values[i].charAt(0)) {
                System.out.println("No");
                System.exit(0);
            }
        }
        System.out.println("Yes");

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int input_values = sc.nextInt(); input_values sc.nextInt() sc.nextInt sc String values[] = new String[input_values]; values new String[input_values] input_values values[0] = sc.next() values[0] values 0 sc.next() sc.next sc for (int i = 1; i < input_values; i++) {
            
            values[i] = sc.next();
            for (int j = 0; j < i; j++) {
                if (values[j].equals(values[i])) {
                    System.out.println("No");
                    System.exit(0);
                }
            }
            if (values[i - 1].charAt(values[i - 1].length() - 1) != values[i].charAt(0)) {
                System.out.println("No");
                System.exit(0);
            }
        } int i = 1; int i = 1; i 1 i < input_values i input_values i++ i++ i {
            
            values[i] = sc.next();
            for (int j = 0; j < i; j++) {
                if (values[j].equals(values[i])) {
                    System.out.println("No");
                    System.exit(0);
                }
            }
            if (values[i - 1].charAt(values[i - 1].length() - 1) != values[i].charAt(0)) {
                System.out.println("No");
                System.exit(0);
            }
        } {
            
            values[i] = sc.next();
            for (int j = 0; j < i; j++) {
                if (values[j].equals(values[i])) {
                    System.out.println("No");
                    System.exit(0);
                }
            }
            if (values[i - 1].charAt(values[i - 1].length() - 1) != values[i].charAt(0)) {
                System.out.println("No");
                System.exit(0);
            }
        } values[i] = sc.next() values[i] values i sc.next() sc.next sc for (int j = 0; j < i; j++) {
                if (values[j].equals(values[i])) {
                    System.out.println("No");
                    System.exit(0);
                }
            } int j = 0; int j = 0; j 0 j < i j i j++ j++ j {
                if (values[j].equals(values[i])) {
                    System.out.println("No");
                    System.exit(0);
                }
            } {
                if (values[j].equals(values[i])) {
                    System.out.println("No");
                    System.exit(0);
                }
            } if (values[j].equals(values[i])) {
                    System.out.println("No");
                    System.exit(0);
                } values[j].equals(values[i]) values[j].equals values[j] values j values[i] values i {
                    System.out.println("No");
                    System.exit(0);
                } System.out.println("No") System.out.println System.out System System.out "No" System.exit(0) System.exit System 0 if (values[i - 1].charAt(values[i - 1].length() - 1) != values[i].charAt(0)) {
                System.out.println("No");
                System.exit(0);
            } values[i - 1].charAt(values[i - 1].length() - 1) != values[i].charAt(0) values[i - 1].charAt(values[i - 1].length() - 1) values[i - 1].charAt values[i - 1] values i - 1 i 1 values[i - 1].length() - 1 values[i - 1].length() values[i - 1].length values[i - 1] values i - 1 i 1 1 values[i].charAt(0) values[i].charAt values[i] values i 0 {
                System.out.println("No");
                System.exit(0);
            } System.out.println("No") System.out.println System.out System System.out "No" System.exit(0) System.exit System 0 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 input_values = sc.nextInt();
        String values[] = new String[input_values];
        values[0] = sc.next();
        for (int i = 1; i < input_values; i++) {
            
            values[i] = sc.next();
            for (int j = 0; j < i; j++) {
                if (values[j].equals(values[i])) {
                    System.out.println("No");
                    System.exit(0);
                }
            }
            if (values[i - 1].charAt(values[i - 1].length() - 1) != values[i].charAt(0)) {
                System.out.println("No");
                System.exit(0);
            }
        }
        System.out.println("Yes");

    }
}
