import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        char last = '\0';
        Set<String> set = new HashSet<>();
        for (int i = 0; i < n; i++) {
            String w =  sc.next();

            if (last != '\0' && last != w.charAt(0)) {
                System.out.println("No");
                return;
            }
            if (set.contains(w)) {
                System.out.println("No");
                return;
            }
            set.add(w);
            last = w.charAt(w.length() -1);
        }
        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();
        char last = '\0';
        Set<String> set = new HashSet<>();
        for (int i = 0; i < n; i++) {
            String w =  sc.next();

            if (last != '\0' && last != w.charAt(0)) {
                System.out.println("No");
                return;
            }
            if (set.contains(w)) {
                System.out.println("No");
                return;
            }
            set.add(w);
            last = w.charAt(w.length() -1);
        }
        System.out.println("Yes");
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        char last = '\0';
        Set<String> set = new HashSet<>();
        for (int i = 0; i < n; i++) {
            String w =  sc.next();

            if (last != '\0' && last != w.charAt(0)) {
                System.out.println("No");
                return;
            }
            if (set.contains(w)) {
                System.out.println("No");
                return;
            }
            set.add(w);
            last = w.charAt(w.length() -1);
        }
        System.out.println("Yes");
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        char last = '\0';
        Set<String> set = new HashSet<>();
        for (int i = 0; i < n; i++) {
            String w =  sc.next();

            if (last != '\0' && last != w.charAt(0)) {
                System.out.println("No");
                return;
            }
            if (set.contains(w)) {
                System.out.println("No");
                return;
            }
            set.add(w);
            last = w.charAt(w.length() -1);
        }
        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 char last = '\0'; last '\0' Set<String> set = new HashSet<>(); set new HashSet<>() for (int i = 0; i < n; i++) {
            String w =  sc.next();

            if (last != '\0' && last != w.charAt(0)) {
                System.out.println("No");
                return;
            }
            if (set.contains(w)) {
                System.out.println("No");
                return;
            }
            set.add(w);
            last = w.charAt(w.length() -1);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            String w =  sc.next();

            if (last != '\0' && last != w.charAt(0)) {
                System.out.println("No");
                return;
            }
            if (set.contains(w)) {
                System.out.println("No");
                return;
            }
            set.add(w);
            last = w.charAt(w.length() -1);
        } {
            String w =  sc.next();

            if (last != '\0' && last != w.charAt(0)) {
                System.out.println("No");
                return;
            }
            if (set.contains(w)) {
                System.out.println("No");
                return;
            }
            set.add(w);
            last = w.charAt(w.length() -1);
        } String w =  sc.next(); w sc.next() sc.next sc if (last != '\0' && last != w.charAt(0)) {
                System.out.println("No");
                return;
            } last != '\0' && last != w.charAt(0) last != '\0' last '\0' last != w.charAt(0) last w.charAt(0) w.charAt w 0 {
                System.out.println("No");
                return;
            } System.out.println("No") System.out.println System.out System System.out "No" return; if (set.contains(w)) {
                System.out.println("No");
                return;
            } set.contains(w) set.contains set w {
                System.out.println("No");
                return;
            } System.out.println("No") System.out.println System.out System System.out "No" return; set.add(w) set.add set w last = w.charAt(w.length() -1) last w.charAt(w.length() -1) w.charAt w w.length() -1 w.length() w.length w 1 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();
        char last = '\0';
        Set<String> set = new HashSet<>();
        for (int i = 0; i < n; i++) {
            String w =  sc.next();

            if (last != '\0' && last != w.charAt(0)) {
                System.out.println("No");
                return;
            }
            if (set.contains(w)) {
                System.out.println("No");
                return;
            }
            set.add(w);
            last = w.charAt(w.length() -1);
        }
        System.out.println("Yes");
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        char last = '\0';
        Set<String> set = new HashSet<>();
        for (int i = 0; i < n; i++) {
            String w =  sc.next();

            if (last != '\0' && last != w.charAt(0)) {
                System.out.println("No");
                return;
            }
            if (set.contains(w)) {
                System.out.println("No");
                return;
            }
            set.add(w);
            last = w.charAt(w.length() -1);
        }
        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();
        char last = '\0';
        Set<String> set = new HashSet<>();
        for (int i = 0; i < n; i++) {
            String w =  sc.next();

            if (last != '\0' && last != w.charAt(0)) {
                System.out.println("No");
                return;
            }
            if (set.contains(w)) {
                System.out.println("No");
                return;
            }
            set.add(w);
            last = w.charAt(w.length() -1);
        }
        System.out.println("Yes");
    }
}
