import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        List<String> words = new ArrayList<>();
        for (int i = 0; i < n; i++) words.add(sc.next());

        Set<String> removed = new LinkedHashSet<>(words);
        if (words.size() != removed.size()) {
            System.out.println("No");
            return;
        }

        char end = words.get(0).charAt(words.get(0).length() - 1);
        for (int i = 1; i < n; i++) {
            char start = words.get(i).charAt(0);
            if (start != end) {
                System.out.println("No");
                return;
            }
            end = words.get(i).charAt(words.get(i).length() - 1);
        }
        System.out.println("Yes");
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        List<String> words = new ArrayList<>();
        for (int i = 0; i < n; i++) words.add(sc.next());

        Set<String> removed = new LinkedHashSet<>(words);
        if (words.size() != removed.size()) {
            System.out.println("No");
            return;
        }

        char end = words.get(0).charAt(words.get(0).length() - 1);
        for (int i = 1; i < n; i++) {
            char start = words.get(i).charAt(0);
            if (start != end) {
                System.out.println("No");
                return;
            }
            end = words.get(i).charAt(words.get(i).length() - 1);
        }
        System.out.println("Yes");
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        List<String> words = new ArrayList<>();
        for (int i = 0; i < n; i++) words.add(sc.next());

        Set<String> removed = new LinkedHashSet<>(words);
        if (words.size() != removed.size()) {
            System.out.println("No");
            return;
        }

        char end = words.get(0).charAt(words.get(0).length() - 1);
        for (int i = 1; i < n; i++) {
            char start = words.get(i).charAt(0);
            if (start != end) {
                System.out.println("No");
                return;
            }
            end = words.get(i).charAt(words.get(i).length() - 1);
        }
        System.out.println("Yes");
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        List<String> words = new ArrayList<>();
        for (int i = 0; i < n; i++) words.add(sc.next());

        Set<String> removed = new LinkedHashSet<>(words);
        if (words.size() != removed.size()) {
            System.out.println("No");
            return;
        }

        char end = words.get(0).charAt(words.get(0).length() - 1);
        for (int i = 1; i < n; i++) {
            char start = words.get(i).charAt(0);
            if (start != end) {
                System.out.println("No");
                return;
            }
            end = words.get(i).charAt(words.get(i).length() - 1);
        }
        System.out.println("Yes");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc List<String> words = new ArrayList<>(); words new ArrayList<>() for (int i = 0; i < n; i++) words.add(sc.next()); int i = 0; int i = 0; i 0 i < n i n i++ i++ i words.add(sc.next()); words.add(sc.next()) words.add words sc.next() sc.next sc Set<String> removed = new LinkedHashSet<>(words); removed new LinkedHashSet<>(words) if (words.size() != removed.size()) {
            System.out.println("No");
            return;
        } words.size() != removed.size() words.size() words.size words removed.size() removed.size removed {
            System.out.println("No");
            return;
        } System.out.println("No") System.out.println System.out System System.out "No" return; char end = words.get(0).charAt(words.get(0).length() - 1); end words.get(0).charAt(words.get(0).length() - 1) words.get(0).charAt words.get(0) words.get words 0 words.get(0).length() - 1 words.get(0).length() words.get(0).length words.get(0) words.get words 0 1 for (int i = 1; i < n; i++) {
            char start = words.get(i).charAt(0);
            if (start != end) {
                System.out.println("No");
                return;
            }
            end = words.get(i).charAt(words.get(i).length() - 1);
        } int i = 1; int i = 1; i 1 i < n i n i++ i++ i {
            char start = words.get(i).charAt(0);
            if (start != end) {
                System.out.println("No");
                return;
            }
            end = words.get(i).charAt(words.get(i).length() - 1);
        } {
            char start = words.get(i).charAt(0);
            if (start != end) {
                System.out.println("No");
                return;
            }
            end = words.get(i).charAt(words.get(i).length() - 1);
        } char start = words.get(i).charAt(0); start words.get(i).charAt(0) words.get(i).charAt words.get(i) words.get words i 0 if (start != end) {
                System.out.println("No");
                return;
            } start != end start end {
                System.out.println("No");
                return;
            } System.out.println("No") System.out.println System.out System System.out "No" return; end = words.get(i).charAt(words.get(i).length() - 1) end words.get(i).charAt(words.get(i).length() - 1) words.get(i).charAt words.get(i) words.get words i words.get(i).length() - 1 words.get(i).length() words.get(i).length words.get(i) words.get words i 1 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) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        List<String> words = new ArrayList<>();
        for (int i = 0; i < n; i++) words.add(sc.next());

        Set<String> removed = new LinkedHashSet<>(words);
        if (words.size() != removed.size()) {
            System.out.println("No");
            return;
        }

        char end = words.get(0).charAt(words.get(0).length() - 1);
        for (int i = 1; i < n; i++) {
            char start = words.get(i).charAt(0);
            if (start != end) {
                System.out.println("No");
                return;
            }
            end = words.get(i).charAt(words.get(i).length() - 1);
        }
        System.out.println("Yes");
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        List<String> words = new ArrayList<>();
        for (int i = 0; i < n; i++) words.add(sc.next());

        Set<String> removed = new LinkedHashSet<>(words);
        if (words.size() != removed.size()) {
            System.out.println("No");
            return;
        }

        char end = words.get(0).charAt(words.get(0).length() - 1);
        for (int i = 1; i < n; i++) {
            char start = words.get(i).charAt(0);
            if (start != end) {
                System.out.println("No");
                return;
            }
            end = words.get(i).charAt(words.get(i).length() - 1);
        }
        System.out.println("Yes");
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        List<String> words = new ArrayList<>();
        for (int i = 0; i < n; i++) words.add(sc.next());

        Set<String> removed = new LinkedHashSet<>(words);
        if (words.size() != removed.size()) {
            System.out.println("No");
            return;
        }

        char end = words.get(0).charAt(words.get(0).length() - 1);
        for (int i = 1; i < n; i++) {
            char start = words.get(i).charAt(0);
            if (start != end) {
                System.out.println("No");
                return;
            }
            end = words.get(i).charAt(words.get(i).length() - 1);
        }
        System.out.println("Yes");
    }
}