import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.List;
import java.util.Scanner;
import java.util.ArrayList;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        ABC_109_B solver = new ABC_109_B();
        solver.solve(1, in, out);
        out.close();
    }

    static class ABC_109_B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int n = in.nextInt();
            List<String> list = new ArrayList<String>();

            for (int i = 0; i < n; i++) {
                String str = in.next();
                if (list.contains(str)) {
                    out.print("No");
                    return;
                }
                list.add(str);
            }
            for (int i = 0; i < n - 1; i++) {
                String str1 = list.get(i);
                String str2 = list.get(i + 1);

                if (str1.charAt(str1.length() - 1) != str2.charAt(0)) {
                    out.print("No");
                    return;
                }
            }

            out.print("Yes");

        }

    }
}
 import java.io.OutputStream; OutputStream java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.List; List java.util import java.util.Scanner; Scanner java.util import java.util.ArrayList; ArrayList java.util public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        ABC_109_B solver = new ABC_109_B();
        solver.solve(1, in, out);
        out.close();
    }

    static class ABC_109_B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int n = in.nextInt();
            List<String> list = new ArrayList<String>();

            for (int i = 0; i < n; i++) {
                String str = in.next();
                if (list.contains(str)) {
                    out.print("No");
                    return;
                }
                list.add(str);
            }
            for (int i = 0; i < n - 1; i++) {
                String str1 = list.get(i);
                String str2 = list.get(i + 1);

                if (str1.charAt(str1.length() - 1) != str2.charAt(0)) {
                    out.print("No");
                    return;
                }
            }

            out.print("Yes");

        }

    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        ABC_109_B solver = new ABC_109_B();
        solver.solve(1, in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        ABC_109_B solver = new ABC_109_B();
        solver.solve(1, in, out);
        out.close();
    } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out Scanner in = new Scanner(inputStream); in new Scanner(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) ABC_109_B solver = new ABC_109_B(); solver new ABC_109_B() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class ABC_109_B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int n = in.nextInt();
            List<String> list = new ArrayList<String>();

            for (int i = 0; i < n; i++) {
                String str = in.next();
                if (list.contains(str)) {
                    out.print("No");
                    return;
                }
                list.add(str);
            }
            for (int i = 0; i < n - 1; i++) {
                String str1 = list.get(i);
                String str2 = list.get(i + 1);

                if (str1.charAt(str1.length() - 1) != str2.charAt(0)) {
                    out.print("No");
                    return;
                }
            }

            out.print("Yes");

        }

    } ABC_109_B public void solve(int testNumber, Scanner in, PrintWriter out) {
            int n = in.nextInt();
            List<String> list = new ArrayList<String>();

            for (int i = 0; i < n; i++) {
                String str = in.next();
                if (list.contains(str)) {
                    out.print("No");
                    return;
                }
                list.add(str);
            }
            for (int i = 0; i < n - 1; i++) {
                String str1 = list.get(i);
                String str2 = list.get(i + 1);

                if (str1.charAt(str1.length() - 1) != str2.charAt(0)) {
                    out.print("No");
                    return;
                }
            }

            out.print("Yes");

        } solve {
            int n = in.nextInt();
            List<String> list = new ArrayList<String>();

            for (int i = 0; i < n; i++) {
                String str = in.next();
                if (list.contains(str)) {
                    out.print("No");
                    return;
                }
                list.add(str);
            }
            for (int i = 0; i < n - 1; i++) {
                String str1 = list.get(i);
                String str2 = list.get(i + 1);

                if (str1.charAt(str1.length() - 1) != str2.charAt(0)) {
                    out.print("No");
                    return;
                }
            }

            out.print("Yes");

        } int n = in.nextInt(); n in.nextInt() in.nextInt in List<String> list = new ArrayList<String>(); list new ArrayList<String>() for (int i = 0; i < n; i++) {
                String str = in.next();
                if (list.contains(str)) {
                    out.print("No");
                    return;
                }
                list.add(str);
            } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
                String str = in.next();
                if (list.contains(str)) {
                    out.print("No");
                    return;
                }
                list.add(str);
            } {
                String str = in.next();
                if (list.contains(str)) {
                    out.print("No");
                    return;
                }
                list.add(str);
            } String str = in.next(); str in.next() in.next in if (list.contains(str)) {
                    out.print("No");
                    return;
                } list.contains(str) list.contains list str {
                    out.print("No");
                    return;
                } out.print("No") out.print out "No" return; list.add(str) list.add list str for (int i = 0; i < n - 1; i++) {
                String str1 = list.get(i);
                String str2 = list.get(i + 1);

                if (str1.charAt(str1.length() - 1) != str2.charAt(0)) {
                    out.print("No");
                    return;
                }
            } int i = 0; int i = 0; i 0 i < n - 1 i n - 1 n 1 i++ i++ i {
                String str1 = list.get(i);
                String str2 = list.get(i + 1);

                if (str1.charAt(str1.length() - 1) != str2.charAt(0)) {
                    out.print("No");
                    return;
                }
            } {
                String str1 = list.get(i);
                String str2 = list.get(i + 1);

                if (str1.charAt(str1.length() - 1) != str2.charAt(0)) {
                    out.print("No");
                    return;
                }
            } String str1 = list.get(i); str1 list.get(i) list.get list i String str2 = list.get(i + 1); str2 list.get(i + 1) list.get list i + 1 i 1 if (str1.charAt(str1.length() - 1) != str2.charAt(0)) {
                    out.print("No");
                    return;
                } str1.charAt(str1.length() - 1) != str2.charAt(0) str1.charAt(str1.length() - 1) str1.charAt str1 str1.length() - 1 str1.length() str1.length str1 1 str2.charAt(0) str2.charAt str2 0 {
                    out.print("No");
                    return;
                } out.print("No") out.print out "No" return; out.print("Yes") out.print out "Yes" int testNumber testNumber Scanner in in PrintWriter out out public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        ABC_109_B solver = new ABC_109_B();
        solver.solve(1, in, out);
        out.close();
    }

    static class ABC_109_B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int n = in.nextInt();
            List<String> list = new ArrayList<String>();

            for (int i = 0; i < n; i++) {
                String str = in.next();
                if (list.contains(str)) {
                    out.print("No");
                    return;
                }
                list.add(str);
            }
            for (int i = 0; i < n - 1; i++) {
                String str1 = list.get(i);
                String str2 = list.get(i + 1);

                if (str1.charAt(str1.length() - 1) != str2.charAt(0)) {
                    out.print("No");
                    return;
                }
            }

            out.print("Yes");

        }

    }
} public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        ABC_109_B solver = new ABC_109_B();
        solver.solve(1, in, out);
        out.close();
    }

    static class ABC_109_B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int n = in.nextInt();
            List<String> list = new ArrayList<String>();

            for (int i = 0; i < n; i++) {
                String str = in.next();
                if (list.contains(str)) {
                    out.print("No");
                    return;
                }
                list.add(str);
            }
            for (int i = 0; i < n - 1; i++) {
                String str1 = list.get(i);
                String str2 = list.get(i + 1);

                if (str1.charAt(str1.length() - 1) != str2.charAt(0)) {
                    out.print("No");
                    return;
                }
            }

            out.print("Yes");

        }

    }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.List;
import java.util.Scanner;
import java.util.ArrayList;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        ABC_109_B solver = new ABC_109_B();
        solver.solve(1, in, out);
        out.close();
    }

    static class ABC_109_B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int n = in.nextInt();
            List<String> list = new ArrayList<String>();

            for (int i = 0; i < n; i++) {
                String str = in.next();
                if (list.contains(str)) {
                    out.print("No");
                    return;
                }
                list.add(str);
            }
            for (int i = 0; i < n - 1; i++) {
                String str1 = list.get(i);
                String str2 = list.get(i + 1);

                if (str1.charAt(str1.length() - 1) != str2.charAt(0)) {
                    out.print("No");
                    return;
                }
            }

            out.print("Yes");

        }

    }
}

