import java.util.ArrayList;
import java.util.Scanner;

public class Main {
    static int N;
    static ArrayList<String> W;

    private static void init() {
        Scanner scanner = new Scanner(System.in);
        N = scanner.nextInt();
        scanner.nextLine();
        W = new ArrayList<>();
        for(int i = 0; i < N; i++) {
            W.add(scanner.nextLine());
        }
        scanner.close();
    }


    public static void main(String args[]) {
        init();

        boolean ok = true;
        char prevTail = 'a';
        for(int i = 0; i < N; i++) {
            for(int j = 0; j < N; j++) {
                if(i != j) {
                    if(W.get(i).equals(W.get(j))) {
                        ok = false;
                        break;
                    }
                }
            }

            if(i != 0 && prevTail != W.get(i).charAt(0)) {
                ok = false;
            }
            prevTail = W.get(i).charAt(W.get(i).length() - 1);
        }

        if(ok) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} import java.util.ArrayList; ArrayList java.util import java.util.Scanner; Scanner java.util public class Main {
    static int N;
    static ArrayList<String> W;

    private static void init() {
        Scanner scanner = new Scanner(System.in);
        N = scanner.nextInt();
        scanner.nextLine();
        W = new ArrayList<>();
        for(int i = 0; i < N; i++) {
            W.add(scanner.nextLine());
        }
        scanner.close();
    }


    public static void main(String args[]) {
        init();

        boolean ok = true;
        char prevTail = 'a';
        for(int i = 0; i < N; i++) {
            for(int j = 0; j < N; j++) {
                if(i != j) {
                    if(W.get(i).equals(W.get(j))) {
                        ok = false;
                        break;
                    }
                }
            }

            if(i != 0 && prevTail != W.get(i).charAt(0)) {
                ok = false;
            }
            prevTail = W.get(i).charAt(W.get(i).length() - 1);
        }

        if(ok) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} Main static int N; N static ArrayList<String> W; W private static void init() {
        Scanner scanner = new Scanner(System.in);
        N = scanner.nextInt();
        scanner.nextLine();
        W = new ArrayList<>();
        for(int i = 0; i < N; i++) {
            W.add(scanner.nextLine());
        }
        scanner.close();
    } init {
        Scanner scanner = new Scanner(System.in);
        N = scanner.nextInt();
        scanner.nextLine();
        W = new ArrayList<>();
        for(int i = 0; i < N; i++) {
            W.add(scanner.nextLine());
        }
        scanner.close();
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) N = scanner.nextInt() N scanner.nextInt() scanner.nextInt scanner scanner.nextLine() scanner.nextLine scanner W = new ArrayList<>() W new ArrayList<>() for(int i = 0; i < N; i++) {
            W.add(scanner.nextLine());
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            W.add(scanner.nextLine());
        } {
            W.add(scanner.nextLine());
        } W.add(scanner.nextLine()) W.add W scanner.nextLine() scanner.nextLine scanner scanner.close() scanner.close scanner public static void main(String args[]) {
        init();

        boolean ok = true;
        char prevTail = 'a';
        for(int i = 0; i < N; i++) {
            for(int j = 0; j < N; j++) {
                if(i != j) {
                    if(W.get(i).equals(W.get(j))) {
                        ok = false;
                        break;
                    }
                }
            }

            if(i != 0 && prevTail != W.get(i).charAt(0)) {
                ok = false;
            }
            prevTail = W.get(i).charAt(W.get(i).length() - 1);
        }

        if(ok) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    } main {
        init();

        boolean ok = true;
        char prevTail = 'a';
        for(int i = 0; i < N; i++) {
            for(int j = 0; j < N; j++) {
                if(i != j) {
                    if(W.get(i).equals(W.get(j))) {
                        ok = false;
                        break;
                    }
                }
            }

            if(i != 0 && prevTail != W.get(i).charAt(0)) {
                ok = false;
            }
            prevTail = W.get(i).charAt(W.get(i).length() - 1);
        }

        if(ok) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    } init() init boolean ok = true; ok true char prevTail = 'a'; prevTail 'a' for(int i = 0; i < N; i++) {
            for(int j = 0; j < N; j++) {
                if(i != j) {
                    if(W.get(i).equals(W.get(j))) {
                        ok = false;
                        break;
                    }
                }
            }

            if(i != 0 && prevTail != W.get(i).charAt(0)) {
                ok = false;
            }
            prevTail = W.get(i).charAt(W.get(i).length() - 1);
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            for(int j = 0; j < N; j++) {
                if(i != j) {
                    if(W.get(i).equals(W.get(j))) {
                        ok = false;
                        break;
                    }
                }
            }

            if(i != 0 && prevTail != W.get(i).charAt(0)) {
                ok = false;
            }
            prevTail = W.get(i).charAt(W.get(i).length() - 1);
        } {
            for(int j = 0; j < N; j++) {
                if(i != j) {
                    if(W.get(i).equals(W.get(j))) {
                        ok = false;
                        break;
                    }
                }
            }

            if(i != 0 && prevTail != W.get(i).charAt(0)) {
                ok = false;
            }
            prevTail = W.get(i).charAt(W.get(i).length() - 1);
        } for(int j = 0; j < N; j++) {
                if(i != j) {
                    if(W.get(i).equals(W.get(j))) {
                        ok = false;
                        break;
                    }
                }
            } int j = 0; int j = 0; j 0 j < N j N j++ j++ j {
                if(i != j) {
                    if(W.get(i).equals(W.get(j))) {
                        ok = false;
                        break;
                    }
                }
            } {
                if(i != j) {
                    if(W.get(i).equals(W.get(j))) {
                        ok = false;
                        break;
                    }
                }
            } if(i != j) {
                    if(W.get(i).equals(W.get(j))) {
                        ok = false;
                        break;
                    }
                } i != j i j {
                    if(W.get(i).equals(W.get(j))) {
                        ok = false;
                        break;
                    }
                } if(W.get(i).equals(W.get(j))) {
                        ok = false;
                        break;
                    } W.get(i).equals(W.get(j)) W.get(i).equals W.get(i) W.get W i W.get(j) W.get W j {
                        ok = false;
                        break;
                    } ok = false ok false break; if(i != 0 && prevTail != W.get(i).charAt(0)) {
                ok = false;
            } i != 0 && prevTail != W.get(i).charAt(0) i != 0 i 0 prevTail != W.get(i).charAt(0) prevTail W.get(i).charAt(0) W.get(i).charAt W.get(i) W.get W i 0 {
                ok = false;
            } ok = false ok false prevTail = W.get(i).charAt(W.get(i).length() - 1) prevTail W.get(i).charAt(W.get(i).length() - 1) W.get(i).charAt W.get(i) W.get W i W.get(i).length() - 1 W.get(i).length() W.get(i).length W.get(i) W.get W i 1 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" String args[] args public class Main {
    static int N;
    static ArrayList<String> W;

    private static void init() {
        Scanner scanner = new Scanner(System.in);
        N = scanner.nextInt();
        scanner.nextLine();
        W = new ArrayList<>();
        for(int i = 0; i < N; i++) {
            W.add(scanner.nextLine());
        }
        scanner.close();
    }


    public static void main(String args[]) {
        init();

        boolean ok = true;
        char prevTail = 'a';
        for(int i = 0; i < N; i++) {
            for(int j = 0; j < N; j++) {
                if(i != j) {
                    if(W.get(i).equals(W.get(j))) {
                        ok = false;
                        break;
                    }
                }
            }

            if(i != 0 && prevTail != W.get(i).charAt(0)) {
                ok = false;
            }
            prevTail = W.get(i).charAt(W.get(i).length() - 1);
        }

        if(ok) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} public class Main {
    static int N;
    static ArrayList<String> W;

    private static void init() {
        Scanner scanner = new Scanner(System.in);
        N = scanner.nextInt();
        scanner.nextLine();
        W = new ArrayList<>();
        for(int i = 0; i < N; i++) {
            W.add(scanner.nextLine());
        }
        scanner.close();
    }


    public static void main(String args[]) {
        init();

        boolean ok = true;
        char prevTail = 'a';
        for(int i = 0; i < N; i++) {
            for(int j = 0; j < N; j++) {
                if(i != j) {
                    if(W.get(i).equals(W.get(j))) {
                        ok = false;
                        break;
                    }
                }
            }

            if(i != 0 && prevTail != W.get(i).charAt(0)) {
                ok = false;
            }
            prevTail = W.get(i).charAt(W.get(i).length() - 1);
        }

        if(ok) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} Main
import java.util.ArrayList;
import java.util.Scanner;

public class Main {
    static int N;
    static ArrayList<String> W;

    private static void init() {
        Scanner scanner = new Scanner(System.in);
        N = scanner.nextInt();
        scanner.nextLine();
        W = new ArrayList<>();
        for(int i = 0; i < N; i++) {
            W.add(scanner.nextLine());
        }
        scanner.close();
    }


    public static void main(String args[]) {
        init();

        boolean ok = true;
        char prevTail = 'a';
        for(int i = 0; i < N; i++) {
            for(int j = 0; j < N; j++) {
                if(i != j) {
                    if(W.get(i).equals(W.get(j))) {
                        ok = false;
                        break;
                    }
                }
            }

            if(i != 0 && prevTail != W.get(i).charAt(0)) {
                ok = false;
            }
            prevTail = W.get(i).charAt(W.get(i).length() - 1);
        }

        if(ok) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
}