import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        String[] W = new String[N];
        boolean ok = true;
        Set<String> set = new HashSet<>();
        for (int i = 0; i < W.length; i++) {
            W[i] = sc.next();
            if (set.contains(W[i])) {
                ok = false;
            }
            set.add(W[i]);
            if (i >= 1) {
                if (W[i].charAt(0) != W[i - 1].charAt(W[i - 1].length() - 1)) {
                    ok = false;
                }
            }
        }
        if (ok) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
        sc.close();
    }
} import java.util.HashSet; HashSet java.util import java.util.Scanner; Scanner java.util import java.util.Set; Set java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        String[] W = new String[N];
        boolean ok = true;
        Set<String> set = new HashSet<>();
        for (int i = 0; i < W.length; i++) {
            W[i] = sc.next();
            if (set.contains(W[i])) {
                ok = false;
            }
            set.add(W[i]);
            if (i >= 1) {
                if (W[i].charAt(0) != W[i - 1].charAt(W[i - 1].length() - 1)) {
                    ok = false;
                }
            }
        }
        if (ok) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
        sc.close();
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        String[] W = new String[N];
        boolean ok = true;
        Set<String> set = new HashSet<>();
        for (int i = 0; i < W.length; i++) {
            W[i] = sc.next();
            if (set.contains(W[i])) {
                ok = false;
            }
            set.add(W[i]);
            if (i >= 1) {
                if (W[i].charAt(0) != W[i - 1].charAt(W[i - 1].length() - 1)) {
                    ok = false;
                }
            }
        }
        if (ok) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        String[] W = new String[N];
        boolean ok = true;
        Set<String> set = new HashSet<>();
        for (int i = 0; i < W.length; i++) {
            W[i] = sc.next();
            if (set.contains(W[i])) {
                ok = false;
            }
            set.add(W[i]);
            if (i >= 1) {
                if (W[i].charAt(0) != W[i - 1].charAt(W[i - 1].length() - 1)) {
                    ok = false;
                }
            }
        }
        if (ok) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc String[] W = new String[N]; W new String[N] N boolean ok = true; ok true Set<String> set = new HashSet<>(); set new HashSet<>() for (int i = 0; i < W.length; i++) {
            W[i] = sc.next();
            if (set.contains(W[i])) {
                ok = false;
            }
            set.add(W[i]);
            if (i >= 1) {
                if (W[i].charAt(0) != W[i - 1].charAt(W[i - 1].length() - 1)) {
                    ok = false;
                }
            }
        } int i = 0; int i = 0; i 0 i < W.length i W.length W W.length i++ i++ i {
            W[i] = sc.next();
            if (set.contains(W[i])) {
                ok = false;
            }
            set.add(W[i]);
            if (i >= 1) {
                if (W[i].charAt(0) != W[i - 1].charAt(W[i - 1].length() - 1)) {
                    ok = false;
                }
            }
        } {
            W[i] = sc.next();
            if (set.contains(W[i])) {
                ok = false;
            }
            set.add(W[i]);
            if (i >= 1) {
                if (W[i].charAt(0) != W[i - 1].charAt(W[i - 1].length() - 1)) {
                    ok = false;
                }
            }
        } W[i] = sc.next() W[i] W i sc.next() sc.next sc if (set.contains(W[i])) {
                ok = false;
            } set.contains(W[i]) set.contains set W[i] W i {
                ok = false;
            } ok = false ok false set.add(W[i]) set.add set W[i] W i if (i >= 1) {
                if (W[i].charAt(0) != W[i - 1].charAt(W[i - 1].length() - 1)) {
                    ok = false;
                }
            } i >= 1 i 1 {
                if (W[i].charAt(0) != W[i - 1].charAt(W[i - 1].length() - 1)) {
                    ok = false;
                }
            } if (W[i].charAt(0) != W[i - 1].charAt(W[i - 1].length() - 1)) {
                    ok = false;
                } W[i].charAt(0) != W[i - 1].charAt(W[i - 1].length() - 1) W[i].charAt(0) W[i].charAt W[i] W i 0 W[i - 1].charAt(W[i - 1].length() - 1) W[i - 1].charAt W[i - 1] W i - 1 i 1 W[i - 1].length() - 1 W[i - 1].length() W[i - 1].length W[i - 1] W i - 1 i 1 1 {
                    ok = false;
                } ok = false ok false if (ok) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        } ok {
            System.out.println("Yes");
        } System.out.println("Yes") System.out.println System.out System System.out "Yes" {
            System.out.println("No");
        } System.out.println("No") System.out.println System.out System System.out "No" sc.close() sc.close sc String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        String[] W = new String[N];
        boolean ok = true;
        Set<String> set = new HashSet<>();
        for (int i = 0; i < W.length; i++) {
            W[i] = sc.next();
            if (set.contains(W[i])) {
                ok = false;
            }
            set.add(W[i]);
            if (i >= 1) {
                if (W[i].charAt(0) != W[i - 1].charAt(W[i - 1].length() - 1)) {
                    ok = false;
                }
            }
        }
        if (ok) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
        sc.close();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        String[] W = new String[N];
        boolean ok = true;
        Set<String> set = new HashSet<>();
        for (int i = 0; i < W.length; i++) {
            W[i] = sc.next();
            if (set.contains(W[i])) {
                ok = false;
            }
            set.add(W[i]);
            if (i >= 1) {
                if (W[i].charAt(0) != W[i - 1].charAt(W[i - 1].length() - 1)) {
                    ok = false;
                }
            }
        }
        if (ok) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
        sc.close();
    }
} Main
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        String[] W = new String[N];
        boolean ok = true;
        Set<String> set = new HashSet<>();
        for (int i = 0; i < W.length; i++) {
            W[i] = sc.next();
            if (set.contains(W[i])) {
                ok = false;
            }
            set.add(W[i]);
            if (i >= 1) {
                if (W[i].charAt(0) != W[i - 1].charAt(W[i - 1].length() - 1)) {
                    ok = false;
                }
            }
        }
        if (ok) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
        sc.close();
    }
}