import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        List<String> w = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            w.add(sc.next());
        }
        for (int i = 1; i < n; i++) {
            String word = w.get(i);
            String prev = w.get(i - 1);
            for (int j = 0; j < i; j++) {
                if (word.equals(w.get(j))) {
                    System.out.println("No");
                    return;
                }
            }
            if (!word.substring(0, 1).equals(prev.substring(prev.length() - 1))) {
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    }

} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        List<String> w = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            w.add(sc.next());
        }
        for (int i = 1; i < n; i++) {
            String word = w.get(i);
            String prev = w.get(i - 1);
            for (int j = 0; j < i; j++) {
                if (word.equals(w.get(j))) {
                    System.out.println("No");
                    return;
                }
            }
            if (!word.substring(0, 1).equals(prev.substring(prev.length() - 1))) {
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    }

} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        List<String> w = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            w.add(sc.next());
        }
        for (int i = 1; i < n; i++) {
            String word = w.get(i);
            String prev = w.get(i - 1);
            for (int j = 0; j < i; j++) {
                if (word.equals(w.get(j))) {
                    System.out.println("No");
                    return;
                }
            }
            if (!word.substring(0, 1).equals(prev.substring(prev.length() - 1))) {
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        List<String> w = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            w.add(sc.next());
        }
        for (int i = 1; i < n; i++) {
            String word = w.get(i);
            String prev = w.get(i - 1);
            for (int j = 0; j < i; j++) {
                if (word.equals(w.get(j))) {
                    System.out.println("No");
                    return;
                }
            }
            if (!word.substring(0, 1).equals(prev.substring(prev.length() - 1))) {
                System.out.println("No");
                return;
            }
        }
        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> w = new ArrayList<>(); w new ArrayList<>() for (int i = 0; i < n; i++) {
            w.add(sc.next());
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            w.add(sc.next());
        } {
            w.add(sc.next());
        } w.add(sc.next()) w.add w sc.next() sc.next sc for (int i = 1; i < n; i++) {
            String word = w.get(i);
            String prev = w.get(i - 1);
            for (int j = 0; j < i; j++) {
                if (word.equals(w.get(j))) {
                    System.out.println("No");
                    return;
                }
            }
            if (!word.substring(0, 1).equals(prev.substring(prev.length() - 1))) {
                System.out.println("No");
                return;
            }
        } int i = 1; int i = 1; i 1 i < n i n i++ i++ i {
            String word = w.get(i);
            String prev = w.get(i - 1);
            for (int j = 0; j < i; j++) {
                if (word.equals(w.get(j))) {
                    System.out.println("No");
                    return;
                }
            }
            if (!word.substring(0, 1).equals(prev.substring(prev.length() - 1))) {
                System.out.println("No");
                return;
            }
        } {
            String word = w.get(i);
            String prev = w.get(i - 1);
            for (int j = 0; j < i; j++) {
                if (word.equals(w.get(j))) {
                    System.out.println("No");
                    return;
                }
            }
            if (!word.substring(0, 1).equals(prev.substring(prev.length() - 1))) {
                System.out.println("No");
                return;
            }
        } String word = w.get(i); word w.get(i) w.get w i String prev = w.get(i - 1); prev w.get(i - 1) w.get w i - 1 i 1 for (int j = 0; j < i; j++) {
                if (word.equals(w.get(j))) {
                    System.out.println("No");
                    return;
                }
            } int j = 0; int j = 0; j 0 j < i j i j++ j++ j {
                if (word.equals(w.get(j))) {
                    System.out.println("No");
                    return;
                }
            } {
                if (word.equals(w.get(j))) {
                    System.out.println("No");
                    return;
                }
            } if (word.equals(w.get(j))) {
                    System.out.println("No");
                    return;
                } word.equals(w.get(j)) word.equals word w.get(j) w.get w j {
                    System.out.println("No");
                    return;
                } System.out.println("No") System.out.println System.out System System.out "No" return; if (!word.substring(0, 1).equals(prev.substring(prev.length() - 1))) {
                System.out.println("No");
                return;
            } !word.substring(0, 1).equals(prev.substring(prev.length() - 1)) word.substring(0, 1).equals(prev.substring(prev.length() - 1)) word.substring(0, 1).equals word.substring(0, 1) word.substring word 0 1 prev.substring(prev.length() - 1) prev.substring prev prev.length() - 1 prev.length() prev.length prev 1 {
                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) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        List<String> w = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            w.add(sc.next());
        }
        for (int i = 1; i < n; i++) {
            String word = w.get(i);
            String prev = w.get(i - 1);
            for (int j = 0; j < i; j++) {
                if (word.equals(w.get(j))) {
                    System.out.println("No");
                    return;
                }
            }
            if (!word.substring(0, 1).equals(prev.substring(prev.length() - 1))) {
                System.out.println("No");
                return;
            }
        }
        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> w = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            w.add(sc.next());
        }
        for (int i = 1; i < n; i++) {
            String word = w.get(i);
            String prev = w.get(i - 1);
            for (int j = 0; j < i; j++) {
                if (word.equals(w.get(j))) {
                    System.out.println("No");
                    return;
                }
            }
            if (!word.substring(0, 1).equals(prev.substring(prev.length() - 1))) {
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    }

} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        List<String> w = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            w.add(sc.next());
        }
        for (int i = 1; i < n; i++) {
            String word = w.get(i);
            String prev = w.get(i - 1);
            for (int j = 0; j < i; j++) {
                if (word.equals(w.get(j))) {
                    System.out.println("No");
                    return;
                }
            }
            if (!word.substring(0, 1).equals(prev.substring(prev.length() - 1))) {
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    }

}
