import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();scan.nextLine();
        String[] str = new String[n];
        for(int i = 0; i < n; i++) {
            str[i] = scan.nextLine();
        }
        for(int i = 0; i < n; i++) {
            for(int j = 0; j < n; j++) {
                if (i != j && str[i].equals(str[j])) {
                    System.out.println("No");
                    return;
                }
            }
        }
        for(int i = 0; i < n-1; i++) {
            if (str[i].charAt(str[i].length()-1) != str[i+1].charAt(0)) {
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();scan.nextLine();
        String[] str = new String[n];
        for(int i = 0; i < n; i++) {
            str[i] = scan.nextLine();
        }
        for(int i = 0; i < n; i++) {
            for(int j = 0; j < n; j++) {
                if (i != j && str[i].equals(str[j])) {
                    System.out.println("No");
                    return;
                }
            }
        }
        for(int i = 0; i < n-1; i++) {
            if (str[i].charAt(str[i].length()-1) != str[i+1].charAt(0)) {
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    }
} Main public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();scan.nextLine();
        String[] str = new String[n];
        for(int i = 0; i < n; i++) {
            str[i] = scan.nextLine();
        }
        for(int i = 0; i < n; i++) {
            for(int j = 0; j < n; j++) {
                if (i != j && str[i].equals(str[j])) {
                    System.out.println("No");
                    return;
                }
            }
        }
        for(int i = 0; i < n-1; i++) {
            if (str[i].charAt(str[i].length()-1) != str[i+1].charAt(0)) {
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    } main {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();scan.nextLine();
        String[] str = new String[n];
        for(int i = 0; i < n; i++) {
            str[i] = scan.nextLine();
        }
        for(int i = 0; i < n; i++) {
            for(int j = 0; j < n; j++) {
                if (i != j && str[i].equals(str[j])) {
                    System.out.println("No");
                    return;
                }
            }
        }
        for(int i = 0; i < n-1; i++) {
            if (str[i].charAt(str[i].length()-1) != str[i+1].charAt(0)) {
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan scan.nextLine() scan.nextLine scan String[] str = new String[n]; str new String[n] n for(int i = 0; i < n; i++) {
            str[i] = scan.nextLine();
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            str[i] = scan.nextLine();
        } {
            str[i] = scan.nextLine();
        } str[i] = scan.nextLine() str[i] str i scan.nextLine() scan.nextLine scan for(int i = 0; i < n; i++) {
            for(int j = 0; j < n; j++) {
                if (i != j && str[i].equals(str[j])) {
                    System.out.println("No");
                    return;
                }
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            for(int j = 0; j < n; j++) {
                if (i != j && str[i].equals(str[j])) {
                    System.out.println("No");
                    return;
                }
            }
        } {
            for(int j = 0; j < n; j++) {
                if (i != j && str[i].equals(str[j])) {
                    System.out.println("No");
                    return;
                }
            }
        } for(int j = 0; j < n; j++) {
                if (i != j && str[i].equals(str[j])) {
                    System.out.println("No");
                    return;
                }
            } int j = 0; int j = 0; j 0 j < n j n j++ j++ j {
                if (i != j && str[i].equals(str[j])) {
                    System.out.println("No");
                    return;
                }
            } {
                if (i != j && str[i].equals(str[j])) {
                    System.out.println("No");
                    return;
                }
            } if (i != j && str[i].equals(str[j])) {
                    System.out.println("No");
                    return;
                } i != j && str[i].equals(str[j]) i != j i j str[i].equals(str[j]) str[i].equals str[i] str i str[j] str j {
                    System.out.println("No");
                    return;
                } System.out.println("No") System.out.println System.out System System.out "No" return; for(int i = 0; i < n-1; i++) {
            if (str[i].charAt(str[i].length()-1) != str[i+1].charAt(0)) {
                System.out.println("No");
                return;
            }
        } int i = 0; int i = 0; i 0 i < n-1 i n-1 n 1 i++ i++ i {
            if (str[i].charAt(str[i].length()-1) != str[i+1].charAt(0)) {
                System.out.println("No");
                return;
            }
        } {
            if (str[i].charAt(str[i].length()-1) != str[i+1].charAt(0)) {
                System.out.println("No");
                return;
            }
        } if (str[i].charAt(str[i].length()-1) != str[i+1].charAt(0)) {
                System.out.println("No");
                return;
            } str[i].charAt(str[i].length()-1) != str[i+1].charAt(0) str[i].charAt(str[i].length()-1) str[i].charAt str[i] str i str[i].length()-1 str[i].length() str[i].length str[i] str i 1 str[i+1].charAt(0) str[i+1].charAt str[i+1] str i+1 i 1 0 {
                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) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();scan.nextLine();
        String[] str = new String[n];
        for(int i = 0; i < n; i++) {
            str[i] = scan.nextLine();
        }
        for(int i = 0; i < n; i++) {
            for(int j = 0; j < n; j++) {
                if (i != j && str[i].equals(str[j])) {
                    System.out.println("No");
                    return;
                }
            }
        }
        for(int i = 0; i < n-1; i++) {
            if (str[i].charAt(str[i].length()-1) != str[i+1].charAt(0)) {
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();scan.nextLine();
        String[] str = new String[n];
        for(int i = 0; i < n; i++) {
            str[i] = scan.nextLine();
        }
        for(int i = 0; i < n; i++) {
            for(int j = 0; j < n; j++) {
                if (i != j && str[i].equals(str[j])) {
                    System.out.println("No");
                    return;
                }
            }
        }
        for(int i = 0; i < n-1; i++) {
            if (str[i].charAt(str[i].length()-1) != str[i+1].charAt(0)) {
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();scan.nextLine();
        String[] str = new String[n];
        for(int i = 0; i < n; i++) {
            str[i] = scan.nextLine();
        }
        for(int i = 0; i < n; i++) {
            for(int j = 0; j < n; j++) {
                if (i != j && str[i].equals(str[j])) {
                    System.out.println("No");
                    return;
                }
            }
        }
        for(int i = 0; i < n-1; i++) {
            if (str[i].charAt(str[i].length()-1) != str[i+1].charAt(0)) {
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    }
}