import java.util.*;
 
public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        ArrayList<String> list = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            String tmp = sc.next();
            if (list.contains(tmp)) {
                System.out.println("No");
                return;
            } else {
                list.add(tmp);
            }
        }
        for (int i = 1; i < n; i ++) {
            char end = list.get(i - 1).charAt(list.get(i - 1).length() - 1);
            if (list.get(i).charAt(0) != end) {
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        ArrayList<String> list = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            String tmp = sc.next();
            if (list.contains(tmp)) {
                System.out.println("No");
                return;
            } else {
                list.add(tmp);
            }
        }
        for (int i = 1; i < n; i ++) {
            char end = list.get(i - 1).charAt(list.get(i - 1).length() - 1);
            if (list.get(i).charAt(0) != end) {
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        ArrayList<String> list = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            String tmp = sc.next();
            if (list.contains(tmp)) {
                System.out.println("No");
                return;
            } else {
                list.add(tmp);
            }
        }
        for (int i = 1; i < n; i ++) {
            char end = list.get(i - 1).charAt(list.get(i - 1).length() - 1);
            if (list.get(i).charAt(0) != end) {
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    } main {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        ArrayList<String> list = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            String tmp = sc.next();
            if (list.contains(tmp)) {
                System.out.println("No");
                return;
            } else {
                list.add(tmp);
            }
        }
        for (int i = 1; i < n; i ++) {
            char end = list.get(i - 1).charAt(list.get(i - 1).length() - 1);
            if (list.get(i).charAt(0) != end) {
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc ArrayList<String> list = new ArrayList<>(); list new ArrayList<>() for (int i = 0; i < n; i++) {
            String tmp = sc.next();
            if (list.contains(tmp)) {
                System.out.println("No");
                return;
            } else {
                list.add(tmp);
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            String tmp = sc.next();
            if (list.contains(tmp)) {
                System.out.println("No");
                return;
            } else {
                list.add(tmp);
            }
        } {
            String tmp = sc.next();
            if (list.contains(tmp)) {
                System.out.println("No");
                return;
            } else {
                list.add(tmp);
            }
        } String tmp = sc.next(); tmp sc.next() sc.next sc if (list.contains(tmp)) {
                System.out.println("No");
                return;
            } else {
                list.add(tmp);
            } list.contains(tmp) list.contains list tmp {
                System.out.println("No");
                return;
            } System.out.println("No") System.out.println System.out System System.out "No" return; {
                list.add(tmp);
            } list.add(tmp) list.add list tmp for (int i = 1; i < n; i ++) {
            char end = list.get(i - 1).charAt(list.get(i - 1).length() - 1);
            if (list.get(i).charAt(0) != end) {
                System.out.println("No");
                return;
            }
        } int i = 1; int i = 1; i 1 i < n i n i ++ i ++ i {
            char end = list.get(i - 1).charAt(list.get(i - 1).length() - 1);
            if (list.get(i).charAt(0) != end) {
                System.out.println("No");
                return;
            }
        } {
            char end = list.get(i - 1).charAt(list.get(i - 1).length() - 1);
            if (list.get(i).charAt(0) != end) {
                System.out.println("No");
                return;
            }
        } char end = list.get(i - 1).charAt(list.get(i - 1).length() - 1); end list.get(i - 1).charAt(list.get(i - 1).length() - 1) list.get(i - 1).charAt list.get(i - 1) list.get list i - 1 i 1 list.get(i - 1).length() - 1 list.get(i - 1).length() list.get(i - 1).length list.get(i - 1) list.get list i - 1 i 1 1 if (list.get(i).charAt(0) != end) {
                System.out.println("No");
                return;
            } list.get(i).charAt(0) != end list.get(i).charAt(0) list.get(i).charAt list.get(i) list.get list i 0 end {
                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) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        ArrayList<String> list = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            String tmp = sc.next();
            if (list.contains(tmp)) {
                System.out.println("No");
                return;
            } else {
                list.add(tmp);
            }
        }
        for (int i = 1; i < n; i ++) {
            char end = list.get(i - 1).charAt(list.get(i - 1).length() - 1);
            if (list.get(i).charAt(0) != end) {
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        ArrayList<String> list = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            String tmp = sc.next();
            if (list.contains(tmp)) {
                System.out.println("No");
                return;
            } else {
                list.add(tmp);
            }
        }
        for (int i = 1; i < n; i ++) {
            char end = list.get(i - 1).charAt(list.get(i - 1).length() - 1);
            if (list.get(i).charAt(0) != end) {
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    }
} Main
import java.util.*;
 
public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        ArrayList<String> list = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            String tmp = sc.next();
            if (list.contains(tmp)) {
                System.out.println("No");
                return;
            } else {
                list.add(tmp);
            }
        }
        for (int i = 1; i < n; i ++) {
            char end = list.get(i - 1).charAt(list.get(i - 1).length() - 1);
            if (list.get(i).charAt(0) != end) {
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    }
}