import java.util.*;

public class Main {

    public static void main(String[] args) {
	// write your code here
        Scanner sc = new Scanner(System.in);

        // 整数の入力
        int n = sc.nextInt();
        ArrayList<String> list = new ArrayList<>();

        String s = sc.next();
        list.add(s);
        String lastWord = s.split("")[s.length() - 1];

        boolean ruled = true;

        // 文字列の入力
        for(int i = 1; i < n; i++) {
            String value = sc.next();
            if (list.contains(value)) {
                ruled = false;
                break;
            } else if (!value.substring(0, 1).equals(lastWord)) {
                ruled = false;
                break;
            }
            lastWord = value.split("")[value.length() - 1];
            list.add(value);
        }

        // 出力
        System.out.println(ruled ? "Yes" : "No");
    }
} import java.util.*; util.* java public class Main {

    public static void main(String[] args) {
	// write your code here
        Scanner sc = new Scanner(System.in);

        // 整数の入力
        int n = sc.nextInt();
        ArrayList<String> list = new ArrayList<>();

        String s = sc.next();
        list.add(s);
        String lastWord = s.split("")[s.length() - 1];

        boolean ruled = true;

        // 文字列の入力
        for(int i = 1; i < n; i++) {
            String value = sc.next();
            if (list.contains(value)) {
                ruled = false;
                break;
            } else if (!value.substring(0, 1).equals(lastWord)) {
                ruled = false;
                break;
            }
            lastWord = value.split("")[value.length() - 1];
            list.add(value);
        }

        // 出力
        System.out.println(ruled ? "Yes" : "No");
    }
} Main public static void main(String[] args) {
	// write your code here
        Scanner sc = new Scanner(System.in);

        // 整数の入力
        int n = sc.nextInt();
        ArrayList<String> list = new ArrayList<>();

        String s = sc.next();
        list.add(s);
        String lastWord = s.split("")[s.length() - 1];

        boolean ruled = true;

        // 文字列の入力
        for(int i = 1; i < n; i++) {
            String value = sc.next();
            if (list.contains(value)) {
                ruled = false;
                break;
            } else if (!value.substring(0, 1).equals(lastWord)) {
                ruled = false;
                break;
            }
            lastWord = value.split("")[value.length() - 1];
            list.add(value);
        }

        // 出力
        System.out.println(ruled ? "Yes" : "No");
    } main {
	// write your code here
        Scanner sc = new Scanner(System.in);

        // 整数の入力
        int n = sc.nextInt();
        ArrayList<String> list = new ArrayList<>();

        String s = sc.next();
        list.add(s);
        String lastWord = s.split("")[s.length() - 1];

        boolean ruled = true;

        // 文字列の入力
        for(int i = 1; i < n; i++) {
            String value = sc.next();
            if (list.contains(value)) {
                ruled = false;
                break;
            } else if (!value.substring(0, 1).equals(lastWord)) {
                ruled = false;
                break;
            }
            lastWord = value.split("")[value.length() - 1];
            list.add(value);
        }

        // 出力
        System.out.println(ruled ? "Yes" : "No");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc ArrayList<String> list = new ArrayList<>(); list new ArrayList<>() String s = sc.next(); s sc.next() sc.next sc list.add(s) list.add list s String lastWord = s.split("")[s.length() - 1]; lastWord s.split("")[s.length() - 1] s.split("") s.split s "" s.length() - 1 s.length() s.length s 1 boolean ruled = true; ruled true for(int i = 1; i < n; i++) {
            String value = sc.next();
            if (list.contains(value)) {
                ruled = false;
                break;
            } else if (!value.substring(0, 1).equals(lastWord)) {
                ruled = false;
                break;
            }
            lastWord = value.split("")[value.length() - 1];
            list.add(value);
        } int i = 1; int i = 1; i 1 i < n i n i++ i++ i {
            String value = sc.next();
            if (list.contains(value)) {
                ruled = false;
                break;
            } else if (!value.substring(0, 1).equals(lastWord)) {
                ruled = false;
                break;
            }
            lastWord = value.split("")[value.length() - 1];
            list.add(value);
        } {
            String value = sc.next();
            if (list.contains(value)) {
                ruled = false;
                break;
            } else if (!value.substring(0, 1).equals(lastWord)) {
                ruled = false;
                break;
            }
            lastWord = value.split("")[value.length() - 1];
            list.add(value);
        } String value = sc.next(); value sc.next() sc.next sc if (list.contains(value)) {
                ruled = false;
                break;
            } else if (!value.substring(0, 1).equals(lastWord)) {
                ruled = false;
                break;
            } list.contains(value) list.contains list value {
                ruled = false;
                break;
            } ruled = false ruled false break; if (!value.substring(0, 1).equals(lastWord)) {
                ruled = false;
                break;
            } !value.substring(0, 1).equals(lastWord) value.substring(0, 1).equals(lastWord) value.substring(0, 1).equals value.substring(0, 1) value.substring value 0 1 lastWord {
                ruled = false;
                break;
            } ruled = false ruled false break; lastWord = value.split("")[value.length() - 1] lastWord value.split("")[value.length() - 1] value.split("") value.split value "" value.length() - 1 value.length() value.length value 1 list.add(value) list.add list value System.out.println(ruled ? "Yes" : "No") System.out.println System.out System System.out ruled ? "Yes" : "No" ruled "Yes" "No" String[] args args public class Main {

    public static void main(String[] args) {
	// write your code here
        Scanner sc = new Scanner(System.in);

        // 整数の入力
        int n = sc.nextInt();
        ArrayList<String> list = new ArrayList<>();

        String s = sc.next();
        list.add(s);
        String lastWord = s.split("")[s.length() - 1];

        boolean ruled = true;

        // 文字列の入力
        for(int i = 1; i < n; i++) {
            String value = sc.next();
            if (list.contains(value)) {
                ruled = false;
                break;
            } else if (!value.substring(0, 1).equals(lastWord)) {
                ruled = false;
                break;
            }
            lastWord = value.split("")[value.length() - 1];
            list.add(value);
        }

        // 出力
        System.out.println(ruled ? "Yes" : "No");
    }
} public class Main {

    public static void main(String[] args) {
	// write your code here
        Scanner sc = new Scanner(System.in);

        // 整数の入力
        int n = sc.nextInt();
        ArrayList<String> list = new ArrayList<>();

        String s = sc.next();
        list.add(s);
        String lastWord = s.split("")[s.length() - 1];

        boolean ruled = true;

        // 文字列の入力
        for(int i = 1; i < n; i++) {
            String value = sc.next();
            if (list.contains(value)) {
                ruled = false;
                break;
            } else if (!value.substring(0, 1).equals(lastWord)) {
                ruled = false;
                break;
            }
            lastWord = value.split("")[value.length() - 1];
            list.add(value);
        }

        // 出力
        System.out.println(ruled ? "Yes" : "No");
    }
} Main
import java.util.*;

public class Main {

    public static void main(String[] args) {
	// write your code here
        Scanner sc = new Scanner(System.in);

        // 整数の入力
        int n = sc.nextInt();
        ArrayList<String> list = new ArrayList<>();

        String s = sc.next();
        list.add(s);
        String lastWord = s.split("")[s.length() - 1];

        boolean ruled = true;

        // 文字列の入力
        for(int i = 1; i < n; i++) {
            String value = sc.next();
            if (list.contains(value)) {
                ruled = false;
                break;
            } else if (!value.substring(0, 1).equals(lastWord)) {
                ruled = false;
                break;
            }
            lastWord = value.split("")[value.length() - 1];
            list.add(value);
        }

        // 出力
        System.out.println(ruled ? "Yes" : "No");
    }
}