import java.lang.reflect.Array;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main {




    public static void main(String[] args) {

        Scanner scan = new Scanner(System.in) ;
        int N = Integer.parseInt(scan.next());
        String[] wordArray = new String[N];


        for(int i = 0; i < N; i++){
            wordArray[i] = scan.next();
        }


        for(int i = 0; i < N; i++){
            for(int j = 0; j < N; j++){
                if( (i != j) && wordArray[i].equals(wordArray[j])){
                    System.out.println("No");
                    return;
                }
            }
        }

        String end;
        String top;
        String a;


        for(int i = 0; i < N -1; i++){


            end = wordArray[i].substring(wordArray[i].length()-1);
            top = wordArray[i+1].substring(0,1);

            if(end.equals(top) == false) {
                System.out.println("No");
                return;
            }





        }

        System.out.println("Yes");
    }
} import java.lang.reflect.Array; Array java.lang.reflect import java.util.*; util.* java import java.util.regex.Matcher; Matcher java.util.regex import java.util.regex.Pattern; Pattern java.util.regex public class Main {




    public static void main(String[] args) {

        Scanner scan = new Scanner(System.in) ;
        int N = Integer.parseInt(scan.next());
        String[] wordArray = new String[N];


        for(int i = 0; i < N; i++){
            wordArray[i] = scan.next();
        }


        for(int i = 0; i < N; i++){
            for(int j = 0; j < N; j++){
                if( (i != j) && wordArray[i].equals(wordArray[j])){
                    System.out.println("No");
                    return;
                }
            }
        }

        String end;
        String top;
        String a;


        for(int i = 0; i < N -1; i++){


            end = wordArray[i].substring(wordArray[i].length()-1);
            top = wordArray[i+1].substring(0,1);

            if(end.equals(top) == false) {
                System.out.println("No");
                return;
            }





        }

        System.out.println("Yes");
    }
} Main public static void main(String[] args) {

        Scanner scan = new Scanner(System.in) ;
        int N = Integer.parseInt(scan.next());
        String[] wordArray = new String[N];


        for(int i = 0; i < N; i++){
            wordArray[i] = scan.next();
        }


        for(int i = 0; i < N; i++){
            for(int j = 0; j < N; j++){
                if( (i != j) && wordArray[i].equals(wordArray[j])){
                    System.out.println("No");
                    return;
                }
            }
        }

        String end;
        String top;
        String a;


        for(int i = 0; i < N -1; i++){


            end = wordArray[i].substring(wordArray[i].length()-1);
            top = wordArray[i+1].substring(0,1);

            if(end.equals(top) == false) {
                System.out.println("No");
                return;
            }





        }

        System.out.println("Yes");
    } main {

        Scanner scan = new Scanner(System.in) ;
        int N = Integer.parseInt(scan.next());
        String[] wordArray = new String[N];


        for(int i = 0; i < N; i++){
            wordArray[i] = scan.next();
        }


        for(int i = 0; i < N; i++){
            for(int j = 0; j < N; j++){
                if( (i != j) && wordArray[i].equals(wordArray[j])){
                    System.out.println("No");
                    return;
                }
            }
        }

        String end;
        String top;
        String a;


        for(int i = 0; i < N -1; i++){


            end = wordArray[i].substring(wordArray[i].length()-1);
            top = wordArray[i+1].substring(0,1);

            if(end.equals(top) == false) {
                System.out.println("No");
                return;
            }





        }

        System.out.println("Yes");
    } Scanner scan = new Scanner(System.in) ; scan new Scanner(System.in) int N = Integer.parseInt(scan.next()); N Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan String[] wordArray = new String[N]; wordArray new String[N] N for(int i = 0; i < N; i++){
            wordArray[i] = scan.next();
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            wordArray[i] = scan.next();
        } {
            wordArray[i] = scan.next();
        } wordArray[i] = scan.next() wordArray[i] wordArray i scan.next() scan.next scan for(int i = 0; i < N; i++){
            for(int j = 0; j < N; j++){
                if( (i != j) && wordArray[i].equals(wordArray[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) && wordArray[i].equals(wordArray[j])){
                    System.out.println("No");
                    return;
                }
            }
        } {
            for(int j = 0; j < N; j++){
                if( (i != j) && wordArray[i].equals(wordArray[j])){
                    System.out.println("No");
                    return;
                }
            }
        } for(int j = 0; j < N; j++){
                if( (i != j) && wordArray[i].equals(wordArray[j])){
                    System.out.println("No");
                    return;
                }
            } int j = 0; int j = 0; j 0 j < N j N j++ j++ j {
                if( (i != j) && wordArray[i].equals(wordArray[j])){
                    System.out.println("No");
                    return;
                }
            } {
                if( (i != j) && wordArray[i].equals(wordArray[j])){
                    System.out.println("No");
                    return;
                }
            } if( (i != j) && wordArray[i].equals(wordArray[j])){
                    System.out.println("No");
                    return;
                } (i != j) && wordArray[i].equals(wordArray[j]) (i != j) i j wordArray[i].equals(wordArray[j]) wordArray[i].equals wordArray[i] wordArray i wordArray[j] wordArray j {
                    System.out.println("No");
                    return;
                } System.out.println("No") System.out.println System.out System System.out "No" return; String end; end String top; top String a; a for(int i = 0; i < N -1; i++){


            end = wordArray[i].substring(wordArray[i].length()-1);
            top = wordArray[i+1].substring(0,1);

            if(end.equals(top) == false) {
                System.out.println("No");
                return;
            }





        } int i = 0; int i = 0; i 0 i < N -1 i N -1 N 1 i++ i++ i {


            end = wordArray[i].substring(wordArray[i].length()-1);
            top = wordArray[i+1].substring(0,1);

            if(end.equals(top) == false) {
                System.out.println("No");
                return;
            }





        } {


            end = wordArray[i].substring(wordArray[i].length()-1);
            top = wordArray[i+1].substring(0,1);

            if(end.equals(top) == false) {
                System.out.println("No");
                return;
            }





        } end = wordArray[i].substring(wordArray[i].length()-1) end wordArray[i].substring(wordArray[i].length()-1) wordArray[i].substring wordArray[i] wordArray i wordArray[i].length()-1 wordArray[i].length() wordArray[i].length wordArray[i] wordArray i 1 top = wordArray[i+1].substring(0,1) top wordArray[i+1].substring(0,1) wordArray[i+1].substring wordArray[i+1] wordArray i+1 i 1 0 1 if(end.equals(top) == false) {
                System.out.println("No");
                return;
            } end.equals(top) == false end.equals(top) end.equals end top false {
                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 = Integer.parseInt(scan.next());
        String[] wordArray = new String[N];


        for(int i = 0; i < N; i++){
            wordArray[i] = scan.next();
        }


        for(int i = 0; i < N; i++){
            for(int j = 0; j < N; j++){
                if( (i != j) && wordArray[i].equals(wordArray[j])){
                    System.out.println("No");
                    return;
                }
            }
        }

        String end;
        String top;
        String a;


        for(int i = 0; i < N -1; i++){


            end = wordArray[i].substring(wordArray[i].length()-1);
            top = wordArray[i+1].substring(0,1);

            if(end.equals(top) == false) {
                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 = Integer.parseInt(scan.next());
        String[] wordArray = new String[N];


        for(int i = 0; i < N; i++){
            wordArray[i] = scan.next();
        }


        for(int i = 0; i < N; i++){
            for(int j = 0; j < N; j++){
                if( (i != j) && wordArray[i].equals(wordArray[j])){
                    System.out.println("No");
                    return;
                }
            }
        }

        String end;
        String top;
        String a;


        for(int i = 0; i < N -1; i++){


            end = wordArray[i].substring(wordArray[i].length()-1);
            top = wordArray[i+1].substring(0,1);

            if(end.equals(top) == false) {
                System.out.println("No");
                return;
            }





        }

        System.out.println("Yes");
    }
} Main
import java.lang.reflect.Array;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main {




    public static void main(String[] args) {

        Scanner scan = new Scanner(System.in) ;
        int N = Integer.parseInt(scan.next());
        String[] wordArray = new String[N];


        for(int i = 0; i < N; i++){
            wordArray[i] = scan.next();
        }


        for(int i = 0; i < N; i++){
            for(int j = 0; j < N; j++){
                if( (i != j) && wordArray[i].equals(wordArray[j])){
                    System.out.println("No");
                    return;
                }
            }
        }

        String end;
        String top;
        String a;


        for(int i = 0; i < N -1; i++){


            end = wordArray[i].substring(wordArray[i].length()-1);
            top = wordArray[i+1].substring(0,1);

            if(end.equals(top) == false) {
                System.out.println("No");
                return;
            }





        }

        System.out.println("Yes");
    }
}