import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String[] str = new String[n];
        String stush = sc.nextLine();
        for (int i = 0; i < n; i++) {
            str[i] = sc.nextLine();
        }
        boolean flag = true;
        for (int i = 0; i < n - 1; i++) {
            char a = str[i].charAt(str[i].length() - 1);
            char b = str[i + 1].charAt(0);
            if (!(a == b)) {
                flag = false;
            }
        }
        for (int i = 1; i < n; i++) {
            for (int j = 0; j < i; j++) {
                if (str[i].equals(str[j])) {
                    flag = false;
                }
            }
        }
        System.out.println(flag ? "Yes" : "No");
    }
} 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();
        String[] str = new String[n];
        String stush = sc.nextLine();
        for (int i = 0; i < n; i++) {
            str[i] = sc.nextLine();
        }
        boolean flag = true;
        for (int i = 0; i < n - 1; i++) {
            char a = str[i].charAt(str[i].length() - 1);
            char b = str[i + 1].charAt(0);
            if (!(a == b)) {
                flag = false;
            }
        }
        for (int i = 1; i < n; i++) {
            for (int j = 0; j < i; j++) {
                if (str[i].equals(str[j])) {
                    flag = false;
                }
            }
        }
        System.out.println(flag ? "Yes" : "No");
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String[] str = new String[n];
        String stush = sc.nextLine();
        for (int i = 0; i < n; i++) {
            str[i] = sc.nextLine();
        }
        boolean flag = true;
        for (int i = 0; i < n - 1; i++) {
            char a = str[i].charAt(str[i].length() - 1);
            char b = str[i + 1].charAt(0);
            if (!(a == b)) {
                flag = false;
            }
        }
        for (int i = 1; i < n; i++) {
            for (int j = 0; j < i; j++) {
                if (str[i].equals(str[j])) {
                    flag = false;
                }
            }
        }
        System.out.println(flag ? "Yes" : "No");
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String[] str = new String[n];
        String stush = sc.nextLine();
        for (int i = 0; i < n; i++) {
            str[i] = sc.nextLine();
        }
        boolean flag = true;
        for (int i = 0; i < n - 1; i++) {
            char a = str[i].charAt(str[i].length() - 1);
            char b = str[i + 1].charAt(0);
            if (!(a == b)) {
                flag = false;
            }
        }
        for (int i = 1; i < n; i++) {
            for (int j = 0; j < i; j++) {
                if (str[i].equals(str[j])) {
                    flag = false;
                }
            }
        }
        System.out.println(flag ? "Yes" : "No");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc String[] str = new String[n]; str new String[n] n String stush = sc.nextLine(); stush sc.nextLine() sc.nextLine sc for (int i = 0; i < n; i++) {
            str[i] = sc.nextLine();
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            str[i] = sc.nextLine();
        } {
            str[i] = sc.nextLine();
        } str[i] = sc.nextLine() str[i] str i sc.nextLine() sc.nextLine sc boolean flag = true; flag true for (int i = 0; i < n - 1; i++) {
            char a = str[i].charAt(str[i].length() - 1);
            char b = str[i + 1].charAt(0);
            if (!(a == b)) {
                flag = false;
            }
        } int i = 0; int i = 0; i 0 i < n - 1 i n - 1 n 1 i++ i++ i {
            char a = str[i].charAt(str[i].length() - 1);
            char b = str[i + 1].charAt(0);
            if (!(a == b)) {
                flag = false;
            }
        } {
            char a = str[i].charAt(str[i].length() - 1);
            char b = str[i + 1].charAt(0);
            if (!(a == b)) {
                flag = false;
            }
        } char a = str[i].charAt(str[i].length() - 1); a str[i].charAt(str[i].length() - 1) str[i].charAt str[i] str i str[i].length() - 1 str[i].length() str[i].length str[i] str i 1 char b = str[i + 1].charAt(0); b str[i + 1].charAt(0) str[i + 1].charAt str[i + 1] str i + 1 i 1 0 if (!(a == b)) {
                flag = false;
            } !(a == b) (a == b) a b {
                flag = false;
            } flag = false flag false for (int i = 1; i < n; i++) {
            for (int j = 0; j < i; j++) {
                if (str[i].equals(str[j])) {
                    flag = false;
                }
            }
        } int i = 1; int i = 1; i 1 i < n i n i++ i++ i {
            for (int j = 0; j < i; j++) {
                if (str[i].equals(str[j])) {
                    flag = false;
                }
            }
        } {
            for (int j = 0; j < i; j++) {
                if (str[i].equals(str[j])) {
                    flag = false;
                }
            }
        } for (int j = 0; j < i; j++) {
                if (str[i].equals(str[j])) {
                    flag = false;
                }
            } int j = 0; int j = 0; j 0 j < i j i j++ j++ j {
                if (str[i].equals(str[j])) {
                    flag = false;
                }
            } {
                if (str[i].equals(str[j])) {
                    flag = false;
                }
            } if (str[i].equals(str[j])) {
                    flag = false;
                } str[i].equals(str[j]) str[i].equals str[i] str i str[j] str j {
                    flag = false;
                } flag = false flag false System.out.println(flag ? "Yes" : "No") System.out.println System.out System System.out flag ? "Yes" : "No" flag "Yes" "No" String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String[] str = new String[n];
        String stush = sc.nextLine();
        for (int i = 0; i < n; i++) {
            str[i] = sc.nextLine();
        }
        boolean flag = true;
        for (int i = 0; i < n - 1; i++) {
            char a = str[i].charAt(str[i].length() - 1);
            char b = str[i + 1].charAt(0);
            if (!(a == b)) {
                flag = false;
            }
        }
        for (int i = 1; i < n; i++) {
            for (int j = 0; j < i; j++) {
                if (str[i].equals(str[j])) {
                    flag = false;
                }
            }
        }
        System.out.println(flag ? "Yes" : "No");
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String[] str = new String[n];
        String stush = sc.nextLine();
        for (int i = 0; i < n; i++) {
            str[i] = sc.nextLine();
        }
        boolean flag = true;
        for (int i = 0; i < n - 1; i++) {
            char a = str[i].charAt(str[i].length() - 1);
            char b = str[i + 1].charAt(0);
            if (!(a == b)) {
                flag = false;
            }
        }
        for (int i = 1; i < n; i++) {
            for (int j = 0; j < i; j++) {
                if (str[i].equals(str[j])) {
                    flag = false;
                }
            }
        }
        System.out.println(flag ? "Yes" : "No");
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String[] str = new String[n];
        String stush = sc.nextLine();
        for (int i = 0; i < n; i++) {
            str[i] = sc.nextLine();
        }
        boolean flag = true;
        for (int i = 0; i < n - 1; i++) {
            char a = str[i].charAt(str[i].length() - 1);
            char b = str[i + 1].charAt(0);
            if (!(a == b)) {
                flag = false;
            }
        }
        for (int i = 1; i < n; i++) {
            for (int j = 0; j < i; j++) {
                if (str[i].equals(str[j])) {
                    flag = false;
                }
            }
        }
        System.out.println(flag ? "Yes" : "No");
    }
}