import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        long N = scanner.nextLong(); scanner.nextLine();

        Set<String> strs = new HashSet<>();

        String first = scanner.nextLine();
        strs.add(first);

        char tail = first.charAt(first.length() - 1);

        String ans = "Yes";
        for(int i = 1; i < N; i++) {
            String str = scanner.nextLine();
            char h = str.charAt(0);
            char t = str.charAt(str.length() - 1);

            if(tail != h || strs.contains(str)) {
                ans = "No";
                break;
            }
            tail = t;
            strs.add(str);
        }

        scanner.close();

        System.out.println(ans);
    }
} import java.util.HashSet; HashSet java.util import java.util.Scanner; Scanner java.util import java.util.Set; Set java.util public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        long N = scanner.nextLong(); scanner.nextLine();

        Set<String> strs = new HashSet<>();

        String first = scanner.nextLine();
        strs.add(first);

        char tail = first.charAt(first.length() - 1);

        String ans = "Yes";
        for(int i = 1; i < N; i++) {
            String str = scanner.nextLine();
            char h = str.charAt(0);
            char t = str.charAt(str.length() - 1);

            if(tail != h || strs.contains(str)) {
                ans = "No";
                break;
            }
            tail = t;
            strs.add(str);
        }

        scanner.close();

        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        long N = scanner.nextLong(); scanner.nextLine();

        Set<String> strs = new HashSet<>();

        String first = scanner.nextLine();
        strs.add(first);

        char tail = first.charAt(first.length() - 1);

        String ans = "Yes";
        for(int i = 1; i < N; i++) {
            String str = scanner.nextLine();
            char h = str.charAt(0);
            char t = str.charAt(str.length() - 1);

            if(tail != h || strs.contains(str)) {
                ans = "No";
                break;
            }
            tail = t;
            strs.add(str);
        }

        scanner.close();

        System.out.println(ans);
    } main {
        Scanner scanner = new Scanner(System.in);

        long N = scanner.nextLong(); scanner.nextLine();

        Set<String> strs = new HashSet<>();

        String first = scanner.nextLine();
        strs.add(first);

        char tail = first.charAt(first.length() - 1);

        String ans = "Yes";
        for(int i = 1; i < N; i++) {
            String str = scanner.nextLine();
            char h = str.charAt(0);
            char t = str.charAt(str.length() - 1);

            if(tail != h || strs.contains(str)) {
                ans = "No";
                break;
            }
            tail = t;
            strs.add(str);
        }

        scanner.close();

        System.out.println(ans);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) long N = scanner.nextLong(); N scanner.nextLong() scanner.nextLong scanner scanner.nextLine() scanner.nextLine scanner Set<String> strs = new HashSet<>(); strs new HashSet<>() String first = scanner.nextLine(); first scanner.nextLine() scanner.nextLine scanner strs.add(first) strs.add strs first char tail = first.charAt(first.length() - 1); tail first.charAt(first.length() - 1) first.charAt first first.length() - 1 first.length() first.length first 1 String ans = "Yes"; ans "Yes" for(int i = 1; i < N; i++) {
            String str = scanner.nextLine();
            char h = str.charAt(0);
            char t = str.charAt(str.length() - 1);

            if(tail != h || strs.contains(str)) {
                ans = "No";
                break;
            }
            tail = t;
            strs.add(str);
        } int i = 1; int i = 1; i 1 i < N i N i++ i++ i {
            String str = scanner.nextLine();
            char h = str.charAt(0);
            char t = str.charAt(str.length() - 1);

            if(tail != h || strs.contains(str)) {
                ans = "No";
                break;
            }
            tail = t;
            strs.add(str);
        } {
            String str = scanner.nextLine();
            char h = str.charAt(0);
            char t = str.charAt(str.length() - 1);

            if(tail != h || strs.contains(str)) {
                ans = "No";
                break;
            }
            tail = t;
            strs.add(str);
        } String str = scanner.nextLine(); str scanner.nextLine() scanner.nextLine scanner char h = str.charAt(0); h str.charAt(0) str.charAt str 0 char t = str.charAt(str.length() - 1); t str.charAt(str.length() - 1) str.charAt str str.length() - 1 str.length() str.length str 1 if(tail != h || strs.contains(str)) {
                ans = "No";
                break;
            } tail != h || strs.contains(str) tail != h tail h strs.contains(str) strs.contains strs str {
                ans = "No";
                break;
            } ans = "No" ans "No" break; tail = t tail t strs.add(str) strs.add strs str scanner.close() scanner.close scanner System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        long N = scanner.nextLong(); scanner.nextLine();

        Set<String> strs = new HashSet<>();

        String first = scanner.nextLine();
        strs.add(first);

        char tail = first.charAt(first.length() - 1);

        String ans = "Yes";
        for(int i = 1; i < N; i++) {
            String str = scanner.nextLine();
            char h = str.charAt(0);
            char t = str.charAt(str.length() - 1);

            if(tail != h || strs.contains(str)) {
                ans = "No";
                break;
            }
            tail = t;
            strs.add(str);
        }

        scanner.close();

        System.out.println(ans);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        long N = scanner.nextLong(); scanner.nextLine();

        Set<String> strs = new HashSet<>();

        String first = scanner.nextLine();
        strs.add(first);

        char tail = first.charAt(first.length() - 1);

        String ans = "Yes";
        for(int i = 1; i < N; i++) {
            String str = scanner.nextLine();
            char h = str.charAt(0);
            char t = str.charAt(str.length() - 1);

            if(tail != h || strs.contains(str)) {
                ans = "No";
                break;
            }
            tail = t;
            strs.add(str);
        }

        scanner.close();

        System.out.println(ans);
    }
} Main
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        long N = scanner.nextLong(); scanner.nextLine();

        Set<String> strs = new HashSet<>();

        String first = scanner.nextLine();
        strs.add(first);

        char tail = first.charAt(first.length() - 1);

        String ans = "Yes";
        for(int i = 1; i < N; i++) {
            String str = scanner.nextLine();
            char h = str.charAt(0);
            char t = str.charAt(str.length() - 1);

            if(tail != h || strs.contains(str)) {
                ans = "No";
                break;
            }
            tail = t;
            strs.add(str);
        }

        scanner.close();

        System.out.println(ans);
    }
}
