import java.util.*;

public class Main {

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        HashSet<String> hashSet = new HashSet<>();

        char past = '_';

        for(int i=0; i<N; i++){
            String S = scanner.next();
            if(i != 0){
                if(past != S.charAt(0) || hashSet.contains(S)){
                    System.out.println("No");
                    return;
                }
            }
            past = S.charAt(S.length()-1);
            hashSet.add(S);
        }

        System.out.println("Yes");

    }
} import java.util.*; util.* java public class Main {

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        HashSet<String> hashSet = new HashSet<>();

        char past = '_';

        for(int i=0; i<N; i++){
            String S = scanner.next();
            if(i != 0){
                if(past != S.charAt(0) || hashSet.contains(S)){
                    System.out.println("No");
                    return;
                }
            }
            past = S.charAt(S.length()-1);
            hashSet.add(S);
        }

        System.out.println("Yes");

    }
} Main public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        HashSet<String> hashSet = new HashSet<>();

        char past = '_';

        for(int i=0; i<N; i++){
            String S = scanner.next();
            if(i != 0){
                if(past != S.charAt(0) || hashSet.contains(S)){
                    System.out.println("No");
                    return;
                }
            }
            past = S.charAt(S.length()-1);
            hashSet.add(S);
        }

        System.out.println("Yes");

    } main {

        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        HashSet<String> hashSet = new HashSet<>();

        char past = '_';

        for(int i=0; i<N; i++){
            String S = scanner.next();
            if(i != 0){
                if(past != S.charAt(0) || hashSet.contains(S)){
                    System.out.println("No");
                    return;
                }
            }
            past = S.charAt(S.length()-1);
            hashSet.add(S);
        }

        System.out.println("Yes");

    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner HashSet<String> hashSet = new HashSet<>(); hashSet new HashSet<>() char past = '_'; past '_' for(int i=0; i<N; i++){
            String S = scanner.next();
            if(i != 0){
                if(past != S.charAt(0) || hashSet.contains(S)){
                    System.out.println("No");
                    return;
                }
            }
            past = S.charAt(S.length()-1);
            hashSet.add(S);
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
            String S = scanner.next();
            if(i != 0){
                if(past != S.charAt(0) || hashSet.contains(S)){
                    System.out.println("No");
                    return;
                }
            }
            past = S.charAt(S.length()-1);
            hashSet.add(S);
        } {
            String S = scanner.next();
            if(i != 0){
                if(past != S.charAt(0) || hashSet.contains(S)){
                    System.out.println("No");
                    return;
                }
            }
            past = S.charAt(S.length()-1);
            hashSet.add(S);
        } String S = scanner.next(); S scanner.next() scanner.next scanner if(i != 0){
                if(past != S.charAt(0) || hashSet.contains(S)){
                    System.out.println("No");
                    return;
                }
            } i != 0 i 0 {
                if(past != S.charAt(0) || hashSet.contains(S)){
                    System.out.println("No");
                    return;
                }
            } if(past != S.charAt(0) || hashSet.contains(S)){
                    System.out.println("No");
                    return;
                } past != S.charAt(0) || hashSet.contains(S) past != S.charAt(0) past S.charAt(0) S.charAt S 0 hashSet.contains(S) hashSet.contains hashSet S {
                    System.out.println("No");
                    return;
                } System.out.println("No") System.out.println System.out System System.out "No" return; past = S.charAt(S.length()-1) past S.charAt(S.length()-1) S.charAt S S.length()-1 S.length() S.length S 1 hashSet.add(S) hashSet.add hashSet S 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 scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        HashSet<String> hashSet = new HashSet<>();

        char past = '_';

        for(int i=0; i<N; i++){
            String S = scanner.next();
            if(i != 0){
                if(past != S.charAt(0) || hashSet.contains(S)){
                    System.out.println("No");
                    return;
                }
            }
            past = S.charAt(S.length()-1);
            hashSet.add(S);
        }

        System.out.println("Yes");

    }
} public class Main {

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        HashSet<String> hashSet = new HashSet<>();

        char past = '_';

        for(int i=0; i<N; i++){
            String S = scanner.next();
            if(i != 0){
                if(past != S.charAt(0) || hashSet.contains(S)){
                    System.out.println("No");
                    return;
                }
            }
            past = S.charAt(S.length()-1);
            hashSet.add(S);
        }

        System.out.println("Yes");

    }
} Main
import java.util.*;

public class Main {

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        HashSet<String> hashSet = new HashSet<>();

        char past = '_';

        for(int i=0; i<N; i++){
            String S = scanner.next();
            if(i != 0){
                if(past != S.charAt(0) || hashSet.contains(S)){
                    System.out.println("No");
                    return;
                }
            }
            past = S.charAt(S.length()-1);
            hashSet.add(S);
        }

        System.out.println("Yes");

    }
}
