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 word = sc.next();
            if (list.contains(word)) {
                System.out.println("No");
                return;
            } else {
                list.add(word);
            }
        }
        for (int i = 1; i < n; i++) {
            String tmp = list.get(i);
            String bef = list.get(i - 1);
            String tmp_first = tmp.substring(0,1);
            String bef_last = bef.substring(bef.length() - 1, bef.length());
            if (!tmp_first.equals(bef_last)) {
                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 word = sc.next();
            if (list.contains(word)) {
                System.out.println("No");
                return;
            } else {
                list.add(word);
            }
        }
        for (int i = 1; i < n; i++) {
            String tmp = list.get(i);
            String bef = list.get(i - 1);
            String tmp_first = tmp.substring(0,1);
            String bef_last = bef.substring(bef.length() - 1, bef.length());
            if (!tmp_first.equals(bef_last)) {
                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 word = sc.next();
            if (list.contains(word)) {
                System.out.println("No");
                return;
            } else {
                list.add(word);
            }
        }
        for (int i = 1; i < n; i++) {
            String tmp = list.get(i);
            String bef = list.get(i - 1);
            String tmp_first = tmp.substring(0,1);
            String bef_last = bef.substring(bef.length() - 1, bef.length());
            if (!tmp_first.equals(bef_last)) {
                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 word = sc.next();
            if (list.contains(word)) {
                System.out.println("No");
                return;
            } else {
                list.add(word);
            }
        }
        for (int i = 1; i < n; i++) {
            String tmp = list.get(i);
            String bef = list.get(i - 1);
            String tmp_first = tmp.substring(0,1);
            String bef_last = bef.substring(bef.length() - 1, bef.length());
            if (!tmp_first.equals(bef_last)) {
                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 word = sc.next();
            if (list.contains(word)) {
                System.out.println("No");
                return;
            } else {
                list.add(word);
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            String word = sc.next();
            if (list.contains(word)) {
                System.out.println("No");
                return;
            } else {
                list.add(word);
            }
        } {
            String word = sc.next();
            if (list.contains(word)) {
                System.out.println("No");
                return;
            } else {
                list.add(word);
            }
        } String word = sc.next(); word sc.next() sc.next sc if (list.contains(word)) {
                System.out.println("No");
                return;
            } else {
                list.add(word);
            } list.contains(word) list.contains list word {
                System.out.println("No");
                return;
            } System.out.println("No") System.out.println System.out System System.out "No" return; {
                list.add(word);
            } list.add(word) list.add list word for (int i = 1; i < n; i++) {
            String tmp = list.get(i);
            String bef = list.get(i - 1);
            String tmp_first = tmp.substring(0,1);
            String bef_last = bef.substring(bef.length() - 1, bef.length());
            if (!tmp_first.equals(bef_last)) {
                System.out.println("No");
                return;
            }
        } int i = 1; int i = 1; i 1 i < n i n i++ i++ i {
            String tmp = list.get(i);
            String bef = list.get(i - 1);
            String tmp_first = tmp.substring(0,1);
            String bef_last = bef.substring(bef.length() - 1, bef.length());
            if (!tmp_first.equals(bef_last)) {
                System.out.println("No");
                return;
            }
        } {
            String tmp = list.get(i);
            String bef = list.get(i - 1);
            String tmp_first = tmp.substring(0,1);
            String bef_last = bef.substring(bef.length() - 1, bef.length());
            if (!tmp_first.equals(bef_last)) {
                System.out.println("No");
                return;
            }
        } String tmp = list.get(i); tmp list.get(i) list.get list i String bef = list.get(i - 1); bef list.get(i - 1) list.get list i - 1 i 1 String tmp_first = tmp.substring(0,1); tmp_first tmp.substring(0,1) tmp.substring tmp 0 1 String bef_last = bef.substring(bef.length() - 1, bef.length()); bef_last bef.substring(bef.length() - 1, bef.length()) bef.substring bef bef.length() - 1 bef.length() bef.length bef 1 bef.length() bef.length bef if (!tmp_first.equals(bef_last)) {
                System.out.println("No");
                return;
            } !tmp_first.equals(bef_last) tmp_first.equals(bef_last) tmp_first.equals tmp_first bef_last {
                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 word = sc.next();
            if (list.contains(word)) {
                System.out.println("No");
                return;
            } else {
                list.add(word);
            }
        }
        for (int i = 1; i < n; i++) {
            String tmp = list.get(i);
            String bef = list.get(i - 1);
            String tmp_first = tmp.substring(0,1);
            String bef_last = bef.substring(bef.length() - 1, bef.length());
            if (!tmp_first.equals(bef_last)) {
                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 word = sc.next();
            if (list.contains(word)) {
                System.out.println("No");
                return;
            } else {
                list.add(word);
            }
        }
        for (int i = 1; i < n; i++) {
            String tmp = list.get(i);
            String bef = list.get(i - 1);
            String tmp_first = tmp.substring(0,1);
            String bef_last = bef.substring(bef.length() - 1, bef.length());
            if (!tmp_first.equals(bef_last)) {
                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 word = sc.next();
            if (list.contains(word)) {
                System.out.println("No");
                return;
            } else {
                list.add(word);
            }
        }
        for (int i = 1; i < n; i++) {
            String tmp = list.get(i);
            String bef = list.get(i - 1);
            String tmp_first = tmp.substring(0,1);
            String bef_last = bef.substring(bef.length() - 1, bef.length());
            if (!tmp_first.equals(bef_last)) {
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    }
}