import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int N;
        N = scan.nextInt();
        String[] W = new String[N];
        String ans = "Yes";
        
        for (int i = 0; i < N; i++) {
            W[i] = scan.next();
        }
        for (int i = 0; i < N - 1; i++) {
            if (W[i].charAt(W[i].length() - 1) != W[i + 1].charAt(0)) {
                ans = "No";
                break;
            }
            if (!check(W, W[i])) {
                ans = "No";
                break;
            }
        }
        
        System.out.println(ans);
    }
    
    public static boolean check(String[] W, String s) {
        int count = 0;
        boolean r = true;
        
        for (int i = 0; i < W.length; i++) {
            if (W[i].equals(s)) {
                count++;
            }
            if (count == 2) {
                r = false;
                break;
            }
        }
        
        return r;
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int N;
        N = scan.nextInt();
        String[] W = new String[N];
        String ans = "Yes";
        
        for (int i = 0; i < N; i++) {
            W[i] = scan.next();
        }
        for (int i = 0; i < N - 1; i++) {
            if (W[i].charAt(W[i].length() - 1) != W[i + 1].charAt(0)) {
                ans = "No";
                break;
            }
            if (!check(W, W[i])) {
                ans = "No";
                break;
            }
        }
        
        System.out.println(ans);
    }
    
    public static boolean check(String[] W, String s) {
        int count = 0;
        boolean r = true;
        
        for (int i = 0; i < W.length; i++) {
            if (W[i].equals(s)) {
                count++;
            }
            if (count == 2) {
                r = false;
                break;
            }
        }
        
        return r;
    }
} Main public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int N;
        N = scan.nextInt();
        String[] W = new String[N];
        String ans = "Yes";
        
        for (int i = 0; i < N; i++) {
            W[i] = scan.next();
        }
        for (int i = 0; i < N - 1; i++) {
            if (W[i].charAt(W[i].length() - 1) != W[i + 1].charAt(0)) {
                ans = "No";
                break;
            }
            if (!check(W, W[i])) {
                ans = "No";
                break;
            }
        }
        
        System.out.println(ans);
    } main {
        Scanner scan = new Scanner(System.in);
        int N;
        N = scan.nextInt();
        String[] W = new String[N];
        String ans = "Yes";
        
        for (int i = 0; i < N; i++) {
            W[i] = scan.next();
        }
        for (int i = 0; i < N - 1; i++) {
            if (W[i].charAt(W[i].length() - 1) != W[i + 1].charAt(0)) {
                ans = "No";
                break;
            }
            if (!check(W, W[i])) {
                ans = "No";
                break;
            }
        }
        
        System.out.println(ans);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N; N N = scan.nextInt() N scan.nextInt() scan.nextInt scan String[] W = new String[N]; W new String[N] N String ans = "Yes"; ans "Yes" for (int i = 0; i < N; i++) {
            W[i] = scan.next();
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            W[i] = scan.next();
        } {
            W[i] = scan.next();
        } W[i] = scan.next() W[i] W i scan.next() scan.next scan for (int i = 0; i < N - 1; i++) {
            if (W[i].charAt(W[i].length() - 1) != W[i + 1].charAt(0)) {
                ans = "No";
                break;
            }
            if (!check(W, W[i])) {
                ans = "No";
                break;
            }
        } int i = 0; int i = 0; i 0 i < N - 1 i N - 1 N 1 i++ i++ i {
            if (W[i].charAt(W[i].length() - 1) != W[i + 1].charAt(0)) {
                ans = "No";
                break;
            }
            if (!check(W, W[i])) {
                ans = "No";
                break;
            }
        } {
            if (W[i].charAt(W[i].length() - 1) != W[i + 1].charAt(0)) {
                ans = "No";
                break;
            }
            if (!check(W, W[i])) {
                ans = "No";
                break;
            }
        } if (W[i].charAt(W[i].length() - 1) != W[i + 1].charAt(0)) {
                ans = "No";
                break;
            } W[i].charAt(W[i].length() - 1) != W[i + 1].charAt(0) W[i].charAt(W[i].length() - 1) W[i].charAt W[i] W i W[i].length() - 1 W[i].length() W[i].length W[i] W i 1 W[i + 1].charAt(0) W[i + 1].charAt W[i + 1] W i + 1 i 1 0 {
                ans = "No";
                break;
            } ans = "No" ans "No" break; if (!check(W, W[i])) {
                ans = "No";
                break;
            } !check(W, W[i]) check(W, W[i]) check W W[i] W i {
                ans = "No";
                break;
            } ans = "No" ans "No" break; System.out.println(ans) System.out.println System.out System System.out ans String[] args args public static boolean check(String[] W, String s) {
        int count = 0;
        boolean r = true;
        
        for (int i = 0; i < W.length; i++) {
            if (W[i].equals(s)) {
                count++;
            }
            if (count == 2) {
                r = false;
                break;
            }
        }
        
        return r;
    } check {
        int count = 0;
        boolean r = true;
        
        for (int i = 0; i < W.length; i++) {
            if (W[i].equals(s)) {
                count++;
            }
            if (count == 2) {
                r = false;
                break;
            }
        }
        
        return r;
    } int count = 0; count 0 boolean r = true; r true for (int i = 0; i < W.length; i++) {
            if (W[i].equals(s)) {
                count++;
            }
            if (count == 2) {
                r = false;
                break;
            }
        } int i = 0; int i = 0; i 0 i < W.length i W.length W W.length i++ i++ i {
            if (W[i].equals(s)) {
                count++;
            }
            if (count == 2) {
                r = false;
                break;
            }
        } {
            if (W[i].equals(s)) {
                count++;
            }
            if (count == 2) {
                r = false;
                break;
            }
        } if (W[i].equals(s)) {
                count++;
            } W[i].equals(s) W[i].equals W[i] W i s {
                count++;
            } count++ count if (count == 2) {
                r = false;
                break;
            } count == 2 count 2 {
                r = false;
                break;
            } r = false r false break; return r; r String[] W W String s s public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int N;
        N = scan.nextInt();
        String[] W = new String[N];
        String ans = "Yes";
        
        for (int i = 0; i < N; i++) {
            W[i] = scan.next();
        }
        for (int i = 0; i < N - 1; i++) {
            if (W[i].charAt(W[i].length() - 1) != W[i + 1].charAt(0)) {
                ans = "No";
                break;
            }
            if (!check(W, W[i])) {
                ans = "No";
                break;
            }
        }
        
        System.out.println(ans);
    }
    
    public static boolean check(String[] W, String s) {
        int count = 0;
        boolean r = true;
        
        for (int i = 0; i < W.length; i++) {
            if (W[i].equals(s)) {
                count++;
            }
            if (count == 2) {
                r = false;
                break;
            }
        }
        
        return r;
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int N;
        N = scan.nextInt();
        String[] W = new String[N];
        String ans = "Yes";
        
        for (int i = 0; i < N; i++) {
            W[i] = scan.next();
        }
        for (int i = 0; i < N - 1; i++) {
            if (W[i].charAt(W[i].length() - 1) != W[i + 1].charAt(0)) {
                ans = "No";
                break;
            }
            if (!check(W, W[i])) {
                ans = "No";
                break;
            }
        }
        
        System.out.println(ans);
    }
    
    public static boolean check(String[] W, String s) {
        int count = 0;
        boolean r = true;
        
        for (int i = 0; i < W.length; i++) {
            if (W[i].equals(s)) {
                count++;
            }
            if (count == 2) {
                r = false;
                break;
            }
        }
        
        return r;
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int N;
        N = scan.nextInt();
        String[] W = new String[N];
        String ans = "Yes";
        
        for (int i = 0; i < N; i++) {
            W[i] = scan.next();
        }
        for (int i = 0; i < N - 1; i++) {
            if (W[i].charAt(W[i].length() - 1) != W[i + 1].charAt(0)) {
                ans = "No";
                break;
            }
            if (!check(W, W[i])) {
                ans = "No";
                break;
            }
        }
        
        System.out.println(ans);
    }
    
    public static boolean check(String[] W, String s) {
        int count = 0;
        boolean r = true;
        
        for (int i = 0; i < W.length; i++) {
            if (W[i].equals(s)) {
                count++;
            }
            if (count == 2) {
                r = false;
                break;
            }
        }
        
        return r;
    }
}
