import java.util.*;
import java.math.*;

class Main {
    public static void main(String[] args) {
        new Solver().run();
    }
}

class Solver {

    public void run() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        Set<String> set = new HashSet<String>();

        String prev = sc.next();
        set.add(prev);
        String curr = null;
        for (int i = 2; i <= N; i++) {
            curr = sc.next();

            if (set.contains(curr)) {
                System.out.println("No");
                return;
            }
            set.add(curr);

            int np = prev.length();
            if (prev.charAt(np - 1) != curr.charAt(0)) {
                System.out.println("No");
                return;
            }
            prev = curr;
        }

        System.out.println("Yes");

        return;
    }

} import java.util.*; util.* java import java.math.*; math.* java class Main {
    public static void main(String[] args) {
        new Solver().run();
    }
} Main public static void main(String[] args) {
        new Solver().run();
    } main {
        new Solver().run();
    } new Solver().run() new Solver().run new Solver() String[] args args class Solver {

    public void run() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        Set<String> set = new HashSet<String>();

        String prev = sc.next();
        set.add(prev);
        String curr = null;
        for (int i = 2; i <= N; i++) {
            curr = sc.next();

            if (set.contains(curr)) {
                System.out.println("No");
                return;
            }
            set.add(curr);

            int np = prev.length();
            if (prev.charAt(np - 1) != curr.charAt(0)) {
                System.out.println("No");
                return;
            }
            prev = curr;
        }

        System.out.println("Yes");

        return;
    }

} Solver public void run() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        Set<String> set = new HashSet<String>();

        String prev = sc.next();
        set.add(prev);
        String curr = null;
        for (int i = 2; i <= N; i++) {
            curr = sc.next();

            if (set.contains(curr)) {
                System.out.println("No");
                return;
            }
            set.add(curr);

            int np = prev.length();
            if (prev.charAt(np - 1) != curr.charAt(0)) {
                System.out.println("No");
                return;
            }
            prev = curr;
        }

        System.out.println("Yes");

        return;
    } run {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        Set<String> set = new HashSet<String>();

        String prev = sc.next();
        set.add(prev);
        String curr = null;
        for (int i = 2; i <= N; i++) {
            curr = sc.next();

            if (set.contains(curr)) {
                System.out.println("No");
                return;
            }
            set.add(curr);

            int np = prev.length();
            if (prev.charAt(np - 1) != curr.charAt(0)) {
                System.out.println("No");
                return;
            }
            prev = curr;
        }

        System.out.println("Yes");

        return;
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc Set<String> set = new HashSet<String>(); set new HashSet<String>() String prev = sc.next(); prev sc.next() sc.next sc set.add(prev) set.add set prev String curr = null; curr null for (int i = 2; i <= N; i++) {
            curr = sc.next();

            if (set.contains(curr)) {
                System.out.println("No");
                return;
            }
            set.add(curr);

            int np = prev.length();
            if (prev.charAt(np - 1) != curr.charAt(0)) {
                System.out.println("No");
                return;
            }
            prev = curr;
        } int i = 2; int i = 2; i 2 i <= N i N i++ i++ i {
            curr = sc.next();

            if (set.contains(curr)) {
                System.out.println("No");
                return;
            }
            set.add(curr);

            int np = prev.length();
            if (prev.charAt(np - 1) != curr.charAt(0)) {
                System.out.println("No");
                return;
            }
            prev = curr;
        } {
            curr = sc.next();

            if (set.contains(curr)) {
                System.out.println("No");
                return;
            }
            set.add(curr);

            int np = prev.length();
            if (prev.charAt(np - 1) != curr.charAt(0)) {
                System.out.println("No");
                return;
            }
            prev = curr;
        } curr = sc.next() curr sc.next() sc.next sc if (set.contains(curr)) {
                System.out.println("No");
                return;
            } set.contains(curr) set.contains set curr {
                System.out.println("No");
                return;
            } System.out.println("No") System.out.println System.out System System.out "No" return; set.add(curr) set.add set curr int np = prev.length(); np prev.length() prev.length prev if (prev.charAt(np - 1) != curr.charAt(0)) {
                System.out.println("No");
                return;
            } prev.charAt(np - 1) != curr.charAt(0) prev.charAt(np - 1) prev.charAt prev np - 1 np 1 curr.charAt(0) curr.charAt curr 0 {
                System.out.println("No");
                return;
            } System.out.println("No") System.out.println System.out System System.out "No" return; prev = curr prev curr System.out.println("Yes") System.out.println System.out System System.out "Yes" return;
import java.util.*;
import java.math.*;

class Main {
    public static void main(String[] args) {
        new Solver().run();
    }
}

class Solver {

    public void run() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        Set<String> set = new HashSet<String>();

        String prev = sc.next();
        set.add(prev);
        String curr = null;
        for (int i = 2; i <= N; i++) {
            curr = sc.next();

            if (set.contains(curr)) {
                System.out.println("No");
                return;
            }
            set.add(curr);

            int np = prev.length();
            if (prev.charAt(np - 1) != curr.charAt(0)) {
                System.out.println("No");
                return;
            }
            prev = curr;
        }

        System.out.println("Yes");

        return;
    }

}