import java.util.*;
import java.io.*;

public class Main {
    static class Reader {
        BufferedReader in;

        Reader() throws IOException {
            in = new BufferedReader(new InputStreamReader(System.in));
        }

        Reader(String name) throws IOException {
            in = new BufferedReader(new FileReader(name));
        }

        StringTokenizer tokin = new StringTokenizer("");

        String next() throws IOException {
            if (!tokin.hasMoreTokens()) {
                tokin = new StringTokenizer(in.readLine());
            }
            return tokin.nextToken();
        }

        int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

    }
    static class Writer {
        PrintWriter cout;

        Writer() throws IOException {
            cout = new PrintWriter(System.out);
        }

        Writer(String name) throws IOException {
            cout = new PrintWriter(new FileWriter(name));
        }

        StringBuilder out = new StringBuilder();

        void print(Object a) {
            out.append(a);
        }

        void println(Object a) {
            out.append(a + "\n");
        }

        void close() {
            cout.print(out.toString());
            cout.close();
        }
    }

    public static void main(String args[]) throws IOException {
        Reader in = new Reader();
        Writer out = new Writer();
        int n = in.nextInt();
        TreeSet<String> t = new TreeSet<>();
        boolean must = true;
        String last = in.next();
        t.add(last);
        for (int i = 1; i < n; i++) {
            String s = in.next();
            if(t.contains(s)) {
                must = false;
            } else {
                t.add(s);
            }
            if(last.charAt(last.length() - 1) != s.charAt(0))
                must = false;
            last = s;
        }
        if(must){
            out.print("Yes");
        } else {
            out.print("No");
        }
        out.close();
    }
} import java.util.*; util.* java import java.io.*; io.* java public class Main {
    static class Reader {
        BufferedReader in;

        Reader() throws IOException {
            in = new BufferedReader(new InputStreamReader(System.in));
        }

        Reader(String name) throws IOException {
            in = new BufferedReader(new FileReader(name));
        }

        StringTokenizer tokin = new StringTokenizer("");

        String next() throws IOException {
            if (!tokin.hasMoreTokens()) {
                tokin = new StringTokenizer(in.readLine());
            }
            return tokin.nextToken();
        }

        int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

    }
    static class Writer {
        PrintWriter cout;

        Writer() throws IOException {
            cout = new PrintWriter(System.out);
        }

        Writer(String name) throws IOException {
            cout = new PrintWriter(new FileWriter(name));
        }

        StringBuilder out = new StringBuilder();

        void print(Object a) {
            out.append(a);
        }

        void println(Object a) {
            out.append(a + "\n");
        }

        void close() {
            cout.print(out.toString());
            cout.close();
        }
    }

    public static void main(String args[]) throws IOException {
        Reader in = new Reader();
        Writer out = new Writer();
        int n = in.nextInt();
        TreeSet<String> t = new TreeSet<>();
        boolean must = true;
        String last = in.next();
        t.add(last);
        for (int i = 1; i < n; i++) {
            String s = in.next();
            if(t.contains(s)) {
                must = false;
            } else {
                t.add(s);
            }
            if(last.charAt(last.length() - 1) != s.charAt(0))
                must = false;
            last = s;
        }
        if(must){
            out.print("Yes");
        } else {
            out.print("No");
        }
        out.close();
    }
} Main public static void main(String args[]) throws IOException {
        Reader in = new Reader();
        Writer out = new Writer();
        int n = in.nextInt();
        TreeSet<String> t = new TreeSet<>();
        boolean must = true;
        String last = in.next();
        t.add(last);
        for (int i = 1; i < n; i++) {
            String s = in.next();
            if(t.contains(s)) {
                must = false;
            } else {
                t.add(s);
            }
            if(last.charAt(last.length() - 1) != s.charAt(0))
                must = false;
            last = s;
        }
        if(must){
            out.print("Yes");
        } else {
            out.print("No");
        }
        out.close();
    } main {
        Reader in = new Reader();
        Writer out = new Writer();
        int n = in.nextInt();
        TreeSet<String> t = new TreeSet<>();
        boolean must = true;
        String last = in.next();
        t.add(last);
        for (int i = 1; i < n; i++) {
            String s = in.next();
            if(t.contains(s)) {
                must = false;
            } else {
                t.add(s);
            }
            if(last.charAt(last.length() - 1) != s.charAt(0))
                must = false;
            last = s;
        }
        if(must){
            out.print("Yes");
        } else {
            out.print("No");
        }
        out.close();
    } Reader in = new Reader(); in new Reader() Writer out = new Writer(); out new Writer() int n = in.nextInt(); n in.nextInt() in.nextInt in TreeSet<String> t = new TreeSet<>(); t new TreeSet<>() boolean must = true; must true String last = in.next(); last in.next() in.next in t.add(last) t.add t last for (int i = 1; i < n; i++) {
            String s = in.next();
            if(t.contains(s)) {
                must = false;
            } else {
                t.add(s);
            }
            if(last.charAt(last.length() - 1) != s.charAt(0))
                must = false;
            last = s;
        } int i = 1; int i = 1; i 1 i < n i n i++ i++ i {
            String s = in.next();
            if(t.contains(s)) {
                must = false;
            } else {
                t.add(s);
            }
            if(last.charAt(last.length() - 1) != s.charAt(0))
                must = false;
            last = s;
        } {
            String s = in.next();
            if(t.contains(s)) {
                must = false;
            } else {
                t.add(s);
            }
            if(last.charAt(last.length() - 1) != s.charAt(0))
                must = false;
            last = s;
        } String s = in.next(); s in.next() in.next in if(t.contains(s)) {
                must = false;
            } else {
                t.add(s);
            } t.contains(s) t.contains t s {
                must = false;
            } must = false must false {
                t.add(s);
            } t.add(s) t.add t s if(last.charAt(last.length() - 1) != s.charAt(0))
                must = false; last.charAt(last.length() - 1) != s.charAt(0) last.charAt(last.length() - 1) last.charAt last last.length() - 1 last.length() last.length last 1 s.charAt(0) s.charAt s 0 must = false must false last = s last s if(must){
            out.print("Yes");
        } else {
            out.print("No");
        } must {
            out.print("Yes");
        } out.print("Yes") out.print out "Yes" {
            out.print("No");
        } out.print("No") out.print out "No" out.close() out.close out String args[] args static class Reader {
        BufferedReader in;

        Reader() throws IOException {
            in = new BufferedReader(new InputStreamReader(System.in));
        }

        Reader(String name) throws IOException {
            in = new BufferedReader(new FileReader(name));
        }

        StringTokenizer tokin = new StringTokenizer("");

        String next() throws IOException {
            if (!tokin.hasMoreTokens()) {
                tokin = new StringTokenizer(in.readLine());
            }
            return tokin.nextToken();
        }

        int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

    } Reader BufferedReader in; in StringTokenizer tokin = new StringTokenizer(""); tokin new StringTokenizer("") Reader() throws IOException {
            in = new BufferedReader(new InputStreamReader(System.in));
        } Reader {
            in = new BufferedReader(new InputStreamReader(System.in));
        } in = new BufferedReader(new InputStreamReader(System.in)) in new BufferedReader(new InputStreamReader(System.in)) Reader(String name) throws IOException {
            in = new BufferedReader(new FileReader(name));
        } Reader {
            in = new BufferedReader(new FileReader(name));
        } in = new BufferedReader(new FileReader(name)) in new BufferedReader(new FileReader(name)) String name name String next() throws IOException {
            if (!tokin.hasMoreTokens()) {
                tokin = new StringTokenizer(in.readLine());
            }
            return tokin.nextToken();
        } next {
            if (!tokin.hasMoreTokens()) {
                tokin = new StringTokenizer(in.readLine());
            }
            return tokin.nextToken();
        } if (!tokin.hasMoreTokens()) {
                tokin = new StringTokenizer(in.readLine());
            } !tokin.hasMoreTokens() tokin.hasMoreTokens() tokin.hasMoreTokens tokin {
                tokin = new StringTokenizer(in.readLine());
            } tokin = new StringTokenizer(in.readLine()) tokin new StringTokenizer(in.readLine()) return tokin.nextToken(); tokin.nextToken() tokin.nextToken tokin int nextInt() throws IOException {
            return Integer.parseInt(next());
        } nextInt {
            return Integer.parseInt(next());
        } return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next static class Writer {
        PrintWriter cout;

        Writer() throws IOException {
            cout = new PrintWriter(System.out);
        }

        Writer(String name) throws IOException {
            cout = new PrintWriter(new FileWriter(name));
        }

        StringBuilder out = new StringBuilder();

        void print(Object a) {
            out.append(a);
        }

        void println(Object a) {
            out.append(a + "\n");
        }

        void close() {
            cout.print(out.toString());
            cout.close();
        }
    } Writer PrintWriter cout; cout StringBuilder out = new StringBuilder(); out new StringBuilder() Writer() throws IOException {
            cout = new PrintWriter(System.out);
        } Writer {
            cout = new PrintWriter(System.out);
        } cout = new PrintWriter(System.out) cout new PrintWriter(System.out) Writer(String name) throws IOException {
            cout = new PrintWriter(new FileWriter(name));
        } Writer {
            cout = new PrintWriter(new FileWriter(name));
        } cout = new PrintWriter(new FileWriter(name)) cout new PrintWriter(new FileWriter(name)) String name name void print(Object a) {
            out.append(a);
        } print {
            out.append(a);
        } out.append(a) out.append out a Object a a void println(Object a) {
            out.append(a + "\n");
        } println {
            out.append(a + "\n");
        } out.append(a + "\n") out.append out a + "\n" a "\n" Object a a void close() {
            cout.print(out.toString());
            cout.close();
        } close {
            cout.print(out.toString());
            cout.close();
        } cout.print(out.toString()) cout.print cout out.toString() out.toString out cout.close() cout.close cout public class Main {
    static class Reader {
        BufferedReader in;

        Reader() throws IOException {
            in = new BufferedReader(new InputStreamReader(System.in));
        }

        Reader(String name) throws IOException {
            in = new BufferedReader(new FileReader(name));
        }

        StringTokenizer tokin = new StringTokenizer("");

        String next() throws IOException {
            if (!tokin.hasMoreTokens()) {
                tokin = new StringTokenizer(in.readLine());
            }
            return tokin.nextToken();
        }

        int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

    }
    static class Writer {
        PrintWriter cout;

        Writer() throws IOException {
            cout = new PrintWriter(System.out);
        }

        Writer(String name) throws IOException {
            cout = new PrintWriter(new FileWriter(name));
        }

        StringBuilder out = new StringBuilder();

        void print(Object a) {
            out.append(a);
        }

        void println(Object a) {
            out.append(a + "\n");
        }

        void close() {
            cout.print(out.toString());
            cout.close();
        }
    }

    public static void main(String args[]) throws IOException {
        Reader in = new Reader();
        Writer out = new Writer();
        int n = in.nextInt();
        TreeSet<String> t = new TreeSet<>();
        boolean must = true;
        String last = in.next();
        t.add(last);
        for (int i = 1; i < n; i++) {
            String s = in.next();
            if(t.contains(s)) {
                must = false;
            } else {
                t.add(s);
            }
            if(last.charAt(last.length() - 1) != s.charAt(0))
                must = false;
            last = s;
        }
        if(must){
            out.print("Yes");
        } else {
            out.print("No");
        }
        out.close();
    }
} public class Main {
    static class Reader {
        BufferedReader in;

        Reader() throws IOException {
            in = new BufferedReader(new InputStreamReader(System.in));
        }

        Reader(String name) throws IOException {
            in = new BufferedReader(new FileReader(name));
        }

        StringTokenizer tokin = new StringTokenizer("");

        String next() throws IOException {
            if (!tokin.hasMoreTokens()) {
                tokin = new StringTokenizer(in.readLine());
            }
            return tokin.nextToken();
        }

        int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

    }
    static class Writer {
        PrintWriter cout;

        Writer() throws IOException {
            cout = new PrintWriter(System.out);
        }

        Writer(String name) throws IOException {
            cout = new PrintWriter(new FileWriter(name));
        }

        StringBuilder out = new StringBuilder();

        void print(Object a) {
            out.append(a);
        }

        void println(Object a) {
            out.append(a + "\n");
        }

        void close() {
            cout.print(out.toString());
            cout.close();
        }
    }

    public static void main(String args[]) throws IOException {
        Reader in = new Reader();
        Writer out = new Writer();
        int n = in.nextInt();
        TreeSet<String> t = new TreeSet<>();
        boolean must = true;
        String last = in.next();
        t.add(last);
        for (int i = 1; i < n; i++) {
            String s = in.next();
            if(t.contains(s)) {
                must = false;
            } else {
                t.add(s);
            }
            if(last.charAt(last.length() - 1) != s.charAt(0))
                must = false;
            last = s;
        }
        if(must){
            out.print("Yes");
        } else {
            out.print("No");
        }
        out.close();
    }
} Main
import java.util.*;
import java.io.*;

public class Main {
    static class Reader {
        BufferedReader in;

        Reader() throws IOException {
            in = new BufferedReader(new InputStreamReader(System.in));
        }

        Reader(String name) throws IOException {
            in = new BufferedReader(new FileReader(name));
        }

        StringTokenizer tokin = new StringTokenizer("");

        String next() throws IOException {
            if (!tokin.hasMoreTokens()) {
                tokin = new StringTokenizer(in.readLine());
            }
            return tokin.nextToken();
        }

        int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

    }
    static class Writer {
        PrintWriter cout;

        Writer() throws IOException {
            cout = new PrintWriter(System.out);
        }

        Writer(String name) throws IOException {
            cout = new PrintWriter(new FileWriter(name));
        }

        StringBuilder out = new StringBuilder();

        void print(Object a) {
            out.append(a);
        }

        void println(Object a) {
            out.append(a + "\n");
        }

        void close() {
            cout.print(out.toString());
            cout.close();
        }
    }

    public static void main(String args[]) throws IOException {
        Reader in = new Reader();
        Writer out = new Writer();
        int n = in.nextInt();
        TreeSet<String> t = new TreeSet<>();
        boolean must = true;
        String last = in.next();
        t.add(last);
        for (int i = 1; i < n; i++) {
            String s = in.next();
            if(t.contains(s)) {
                must = false;
            } else {
                t.add(s);
            }
            if(last.charAt(last.length() - 1) != s.charAt(0))
                must = false;
            last = s;
        }
        if(must){
            out.print("Yes");
        } else {
            out.print("No");
        }
        out.close();
    }
}