import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.solve();
    }
    public void solve() {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int N = scan.nextInt();
        char prev = ' ';
        HashSet<String> set = new HashSet<>();
        boolean answer = true;
        for (int i = 0; i < N; i++) {
            String s = scan.next();
            char[] d = s.toCharArray();
            if (prev != ' ') {
                if (d[0] != prev) {
                    answer = false;
                    break;
                }
            }
            if (set.contains(s)) {
                answer = false;
                break;
            }
            set.add(s);
            prev = d[d.length-1];
        }
        System.out.println(answer ? "Yes" : "No");
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.HashSet; HashSet java.util import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.solve();
    }
    public void solve() {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int N = scan.nextInt();
        char prev = ' ';
        HashSet<String> set = new HashSet<>();
        boolean answer = true;
        for (int i = 0; i < N; i++) {
            String s = scan.next();
            char[] d = s.toCharArray();
            if (prev != ' ') {
                if (d[0] != prev) {
                    answer = false;
                    break;
                }
            }
            if (set.contains(s)) {
                answer = false;
                break;
            }
            set.add(s);
            prev = d[d.length-1];
        }
        System.out.println(answer ? "Yes" : "No");
    }
} Main public static void main(String[] args) {
        Main main = new Main();
        main.solve();
    } main {
        Main main = new Main();
        main.solve();
    } Main main = new Main(); main new Main() main.solve() main.solve main String[] args args public void solve() {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int N = scan.nextInt();
        char prev = ' ';
        HashSet<String> set = new HashSet<>();
        boolean answer = true;
        for (int i = 0; i < N; i++) {
            String s = scan.next();
            char[] d = s.toCharArray();
            if (prev != ' ') {
                if (d[0] != prev) {
                    answer = false;
                    break;
                }
            }
            if (set.contains(s)) {
                answer = false;
                break;
            }
            set.add(s);
            prev = d[d.length-1];
        }
        System.out.println(answer ? "Yes" : "No");
    } solve {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int N = scan.nextInt();
        char prev = ' ';
        HashSet<String> set = new HashSet<>();
        boolean answer = true;
        for (int i = 0; i < N; i++) {
            String s = scan.next();
            char[] d = s.toCharArray();
            if (prev != ' ') {
                if (d[0] != prev) {
                    answer = false;
                    break;
                }
            }
            if (set.contains(s)) {
                answer = false;
                break;
            }
            set.add(s);
            prev = d[d.length-1];
        }
        System.out.println(answer ? "Yes" : "No");
    } Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in))); scan new Scanner(new BufferedReader(new InputStreamReader(System.in))) int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan char prev = ' '; prev ' ' HashSet<String> set = new HashSet<>(); set new HashSet<>() boolean answer = true; answer true for (int i = 0; i < N; i++) {
            String s = scan.next();
            char[] d = s.toCharArray();
            if (prev != ' ') {
                if (d[0] != prev) {
                    answer = false;
                    break;
                }
            }
            if (set.contains(s)) {
                answer = false;
                break;
            }
            set.add(s);
            prev = d[d.length-1];
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            String s = scan.next();
            char[] d = s.toCharArray();
            if (prev != ' ') {
                if (d[0] != prev) {
                    answer = false;
                    break;
                }
            }
            if (set.contains(s)) {
                answer = false;
                break;
            }
            set.add(s);
            prev = d[d.length-1];
        } {
            String s = scan.next();
            char[] d = s.toCharArray();
            if (prev != ' ') {
                if (d[0] != prev) {
                    answer = false;
                    break;
                }
            }
            if (set.contains(s)) {
                answer = false;
                break;
            }
            set.add(s);
            prev = d[d.length-1];
        } String s = scan.next(); s scan.next() scan.next scan char[] d = s.toCharArray(); d s.toCharArray() s.toCharArray s if (prev != ' ') {
                if (d[0] != prev) {
                    answer = false;
                    break;
                }
            } prev != ' ' prev ' ' {
                if (d[0] != prev) {
                    answer = false;
                    break;
                }
            } if (d[0] != prev) {
                    answer = false;
                    break;
                } d[0] != prev d[0] d 0 prev {
                    answer = false;
                    break;
                } answer = false answer false break; if (set.contains(s)) {
                answer = false;
                break;
            } set.contains(s) set.contains set s {
                answer = false;
                break;
            } answer = false answer false break; set.add(s) set.add set s prev = d[d.length-1] prev d[d.length-1] d d.length-1 d.length d d.length 1 System.out.println(answer ? "Yes" : "No") System.out.println System.out System System.out answer ? "Yes" : "No" answer "Yes" "No" public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.solve();
    }
    public void solve() {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int N = scan.nextInt();
        char prev = ' ';
        HashSet<String> set = new HashSet<>();
        boolean answer = true;
        for (int i = 0; i < N; i++) {
            String s = scan.next();
            char[] d = s.toCharArray();
            if (prev != ' ') {
                if (d[0] != prev) {
                    answer = false;
                    break;
                }
            }
            if (set.contains(s)) {
                answer = false;
                break;
            }
            set.add(s);
            prev = d[d.length-1];
        }
        System.out.println(answer ? "Yes" : "No");
    }
} public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.solve();
    }
    public void solve() {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int N = scan.nextInt();
        char prev = ' ';
        HashSet<String> set = new HashSet<>();
        boolean answer = true;
        for (int i = 0; i < N; i++) {
            String s = scan.next();
            char[] d = s.toCharArray();
            if (prev != ' ') {
                if (d[0] != prev) {
                    answer = false;
                    break;
                }
            }
            if (set.contains(s)) {
                answer = false;
                break;
            }
            set.add(s);
            prev = d[d.length-1];
        }
        System.out.println(answer ? "Yes" : "No");
    }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.solve();
    }
    public void solve() {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int N = scan.nextInt();
        char prev = ' ';
        HashSet<String> set = new HashSet<>();
        boolean answer = true;
        for (int i = 0; i < N; i++) {
            String s = scan.next();
            char[] d = s.toCharArray();
            if (prev != ' ') {
                if (d[0] != prev) {
                    answer = false;
                    break;
                }
            }
            if (set.contains(s)) {
                answer = false;
                break;
            }
            set.add(s);
            prev = d[d.length-1];
        }
        System.out.println(answer ? "Yes" : "No");
    }
}
