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

public class Main {
    static int[] w = new int[100010];
    static int[] v = new int[100010];
    static int[][] dp = new int[110][100010];
    static int k;

    static int chmin(int a, int b) {
        if (a > b) {
            a = b;
            return a;
        }
        return a;
    }

    static int chmax(int a, int b) {
        if (a < b) {
            a = b;
            return a;
        }
        return a;
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        List<String> list = new ArrayList<String>();
        for (int i = 0; i < n; i++) {
            String w = sc.next();
            if (i != 0) {
                String prev = list.get(i - 1);
                if (list.contains(w) || prev.charAt(prev.length() - 1) != w.charAt(0)) {
                    System.out.println("No");
                    return;
                }
            }
            list.add(w);
        }
        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 {
    static int[] w = new int[100010];
    static int[] v = new int[100010];
    static int[][] dp = new int[110][100010];
    static int k;

    static int chmin(int a, int b) {
        if (a > b) {
            a = b;
            return a;
        }
        return a;
    }

    static int chmax(int a, int b) {
        if (a < b) {
            a = b;
            return a;
        }
        return a;
    }

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

    }
} Main static int[] w = new int[100010]; w new int[100010] 100010 static int[] v = new int[100010]; v new int[100010] 100010 static int[][] dp = new int[110][100010]; dp new int[110][100010] 110 100010 static int k; k static int chmin(int a, int b) {
        if (a > b) {
            a = b;
            return a;
        }
        return a;
    } chmin {
        if (a > b) {
            a = b;
            return a;
        }
        return a;
    } if (a > b) {
            a = b;
            return a;
        } a > b a b {
            a = b;
            return a;
        } a = b a b return a; a return a; a int a a int b b static int chmax(int a, int b) {
        if (a < b) {
            a = b;
            return a;
        }
        return a;
    } chmax {
        if (a < b) {
            a = b;
            return a;
        }
        return a;
    } if (a < b) {
            a = b;
            return a;
        } a < b a b {
            a = b;
            return a;
        } a = b a b return a; a return a; a int a a int b b public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        List<String> list = new ArrayList<String>();
        for (int i = 0; i < n; i++) {
            String w = sc.next();
            if (i != 0) {
                String prev = list.get(i - 1);
                if (list.contains(w) || prev.charAt(prev.length() - 1) != w.charAt(0)) {
                    System.out.println("No");
                    return;
                }
            }
            list.add(w);
        }
        System.out.println("Yes");

    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        List<String> list = new ArrayList<String>();
        for (int i = 0; i < n; i++) {
            String w = sc.next();
            if (i != 0) {
                String prev = list.get(i - 1);
                if (list.contains(w) || prev.charAt(prev.length() - 1) != w.charAt(0)) {
                    System.out.println("No");
                    return;
                }
            }
            list.add(w);
        }
        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> list = new ArrayList<String>(); list new ArrayList<String>() for (int i = 0; i < n; i++) {
            String w = sc.next();
            if (i != 0) {
                String prev = list.get(i - 1);
                if (list.contains(w) || prev.charAt(prev.length() - 1) != w.charAt(0)) {
                    System.out.println("No");
                    return;
                }
            }
            list.add(w);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            String w = sc.next();
            if (i != 0) {
                String prev = list.get(i - 1);
                if (list.contains(w) || prev.charAt(prev.length() - 1) != w.charAt(0)) {
                    System.out.println("No");
                    return;
                }
            }
            list.add(w);
        } {
            String w = sc.next();
            if (i != 0) {
                String prev = list.get(i - 1);
                if (list.contains(w) || prev.charAt(prev.length() - 1) != w.charAt(0)) {
                    System.out.println("No");
                    return;
                }
            }
            list.add(w);
        } String w = sc.next(); w sc.next() sc.next sc if (i != 0) {
                String prev = list.get(i - 1);
                if (list.contains(w) || prev.charAt(prev.length() - 1) != w.charAt(0)) {
                    System.out.println("No");
                    return;
                }
            } i != 0 i 0 {
                String prev = list.get(i - 1);
                if (list.contains(w) || prev.charAt(prev.length() - 1) != w.charAt(0)) {
                    System.out.println("No");
                    return;
                }
            } String prev = list.get(i - 1); prev list.get(i - 1) list.get list i - 1 i 1 if (list.contains(w) || prev.charAt(prev.length() - 1) != w.charAt(0)) {
                    System.out.println("No");
                    return;
                } list.contains(w) || prev.charAt(prev.length() - 1) != w.charAt(0) list.contains(w) list.contains list w prev.charAt(prev.length() - 1) != w.charAt(0) prev.charAt(prev.length() - 1) prev.charAt prev prev.length() - 1 prev.length() prev.length prev 1 w.charAt(0) w.charAt w 0 {
                    System.out.println("No");
                    return;
                } System.out.println("No") System.out.println System.out System System.out "No" return; list.add(w) list.add list w System.out.println("Yes") System.out.println System.out System System.out "Yes" String[] args args public class Main {
    static int[] w = new int[100010];
    static int[] v = new int[100010];
    static int[][] dp = new int[110][100010];
    static int k;

    static int chmin(int a, int b) {
        if (a > b) {
            a = b;
            return a;
        }
        return a;
    }

    static int chmax(int a, int b) {
        if (a < b) {
            a = b;
            return a;
        }
        return a;
    }

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

    }
} public class Main {
    static int[] w = new int[100010];
    static int[] v = new int[100010];
    static int[][] dp = new int[110][100010];
    static int k;

    static int chmin(int a, int b) {
        if (a > b) {
            a = b;
            return a;
        }
        return a;
    }

    static int chmax(int a, int b) {
        if (a < b) {
            a = b;
            return a;
        }
        return a;
    }

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

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

public class Main {
    static int[] w = new int[100010];
    static int[] v = new int[100010];
    static int[][] dp = new int[110][100010];
    static int k;

    static int chmin(int a, int b) {
        if (a > b) {
            a = b;
            return a;
        }
        return a;
    }

    static int chmax(int a, int b) {
        if (a < b) {
            a = b;
            return a;
        }
        return a;
    }

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

    }
}
