import java.util.Arrays;
import java.util.HashSet;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final int n = scanner.nextInt();

        final String[] words = new String[n];
        for (int i = 0; i < n; i++) {
            words[i] = scanner.next();
        }

        for (int i = 1; i < n; i++) {
            if (words[i].charAt(0) != words[i - 1].charAt(words[i - 1].length() - 1)) {
                System.out.println("No");
                return;
            }
        }

        final HashSet<String> wordsSet = new HashSet<>(Arrays.asList(words));
        if (words.length != wordsSet.size()) {
            System.out.println("No");
            return;
        }

        System.out.println("Yes");
    }

} import java.util.Arrays; Arrays java.util import java.util.HashSet; HashSet java.util import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final int n = scanner.nextInt();

        final String[] words = new String[n];
        for (int i = 0; i < n; i++) {
            words[i] = scanner.next();
        }

        for (int i = 1; i < n; i++) {
            if (words[i].charAt(0) != words[i - 1].charAt(words[i - 1].length() - 1)) {
                System.out.println("No");
                return;
            }
        }

        final HashSet<String> wordsSet = new HashSet<>(Arrays.asList(words));
        if (words.length != wordsSet.size()) {
            System.out.println("No");
            return;
        }

        System.out.println("Yes");
    }

} Main public static void main(String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final int n = scanner.nextInt();

        final String[] words = new String[n];
        for (int i = 0; i < n; i++) {
            words[i] = scanner.next();
        }

        for (int i = 1; i < n; i++) {
            if (words[i].charAt(0) != words[i - 1].charAt(words[i - 1].length() - 1)) {
                System.out.println("No");
                return;
            }
        }

        final HashSet<String> wordsSet = new HashSet<>(Arrays.asList(words));
        if (words.length != wordsSet.size()) {
            System.out.println("No");
            return;
        }

        System.out.println("Yes");
    } main {
        final Scanner scanner = new Scanner(System.in);
        final int n = scanner.nextInt();

        final String[] words = new String[n];
        for (int i = 0; i < n; i++) {
            words[i] = scanner.next();
        }

        for (int i = 1; i < n; i++) {
            if (words[i].charAt(0) != words[i - 1].charAt(words[i - 1].length() - 1)) {
                System.out.println("No");
                return;
            }
        }

        final HashSet<String> wordsSet = new HashSet<>(Arrays.asList(words));
        if (words.length != wordsSet.size()) {
            System.out.println("No");
            return;
        }

        System.out.println("Yes");
    } final Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) final int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner final String[] words = new String[n]; words new String[n] n for (int i = 0; i < n; i++) {
            words[i] = scanner.next();
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            words[i] = scanner.next();
        } {
            words[i] = scanner.next();
        } words[i] = scanner.next() words[i] words i scanner.next() scanner.next scanner for (int i = 1; i < n; i++) {
            if (words[i].charAt(0) != words[i - 1].charAt(words[i - 1].length() - 1)) {
                System.out.println("No");
                return;
            }
        } int i = 1; int i = 1; i 1 i < n i n i++ i++ i {
            if (words[i].charAt(0) != words[i - 1].charAt(words[i - 1].length() - 1)) {
                System.out.println("No");
                return;
            }
        } {
            if (words[i].charAt(0) != words[i - 1].charAt(words[i - 1].length() - 1)) {
                System.out.println("No");
                return;
            }
        } if (words[i].charAt(0) != words[i - 1].charAt(words[i - 1].length() - 1)) {
                System.out.println("No");
                return;
            } words[i].charAt(0) != words[i - 1].charAt(words[i - 1].length() - 1) words[i].charAt(0) words[i].charAt words[i] words i 0 words[i - 1].charAt(words[i - 1].length() - 1) words[i - 1].charAt words[i - 1] words i - 1 i 1 words[i - 1].length() - 1 words[i - 1].length() words[i - 1].length words[i - 1] words i - 1 i 1 1 {
                System.out.println("No");
                return;
            } System.out.println("No") System.out.println System.out System System.out "No" return; final HashSet<String> wordsSet = new HashSet<>(Arrays.asList(words)); wordsSet new HashSet<>(Arrays.asList(words)) if (words.length != wordsSet.size()) {
            System.out.println("No");
            return;
        } words.length != wordsSet.size() words.length words words.length wordsSet.size() wordsSet.size wordsSet {
            System.out.println("No");
            return;
        } System.out.println("No") System.out.println System.out System System.out "No" return; System.out.println("Yes") System.out.println System.out System System.out "Yes" String[] args args public class Main {

    public static void main(String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final int n = scanner.nextInt();

        final String[] words = new String[n];
        for (int i = 0; i < n; i++) {
            words[i] = scanner.next();
        }

        for (int i = 1; i < n; i++) {
            if (words[i].charAt(0) != words[i - 1].charAt(words[i - 1].length() - 1)) {
                System.out.println("No");
                return;
            }
        }

        final HashSet<String> wordsSet = new HashSet<>(Arrays.asList(words));
        if (words.length != wordsSet.size()) {
            System.out.println("No");
            return;
        }

        System.out.println("Yes");
    }

} public class Main {

    public static void main(String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final int n = scanner.nextInt();

        final String[] words = new String[n];
        for (int i = 0; i < n; i++) {
            words[i] = scanner.next();
        }

        for (int i = 1; i < n; i++) {
            if (words[i].charAt(0) != words[i - 1].charAt(words[i - 1].length() - 1)) {
                System.out.println("No");
                return;
            }
        }

        final HashSet<String> wordsSet = new HashSet<>(Arrays.asList(words));
        if (words.length != wordsSet.size()) {
            System.out.println("No");
            return;
        }

        System.out.println("Yes");
    }

} Main
import java.util.Arrays;
import java.util.HashSet;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final int n = scanner.nextInt();

        final String[] words = new String[n];
        for (int i = 0; i < n; i++) {
            words[i] = scanner.next();
        }

        for (int i = 1; i < n; i++) {
            if (words[i].charAt(0) != words[i - 1].charAt(words[i - 1].length() - 1)) {
                System.out.println("No");
                return;
            }
        }

        final HashSet<String> wordsSet = new HashSet<>(Arrays.asList(words));
        if (words.length != wordsSet.size()) {
            System.out.println("No");
            return;
        }

        System.out.println("Yes");
    }

}
