import java.util.*;

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        String[] str = new String[N];
        boolean test = true;
        
        for(int i=0; i<N; i++){
            str[i] = sc.next();
            //System.out.println(str[i]);
            if(i>0){
                //System.out.println(str[i]);
                if(str[i-1].charAt(str[i-1].length()-1)!=str[i].charAt(0)){
                    test = false;
                }
                for(int j=0; j<i; j++){
                    if(str[i].equals(str[j])){
                        test = false;
                    }
                }
            }
            if(!test){
                break;
            }
        }
        if(test){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        String[] str = new String[N];
        boolean test = true;
        
        for(int i=0; i<N; i++){
            str[i] = sc.next();
            //System.out.println(str[i]);
            if(i>0){
                //System.out.println(str[i]);
                if(str[i-1].charAt(str[i-1].length()-1)!=str[i].charAt(0)){
                    test = false;
                }
                for(int j=0; j<i; j++){
                    if(str[i].equals(str[j])){
                        test = false;
                    }
                }
            }
            if(!test){
                break;
            }
        }
        if(test){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        String[] str = new String[N];
        boolean test = true;
        
        for(int i=0; i<N; i++){
            str[i] = sc.next();
            //System.out.println(str[i]);
            if(i>0){
                //System.out.println(str[i]);
                if(str[i-1].charAt(str[i-1].length()-1)!=str[i].charAt(0)){
                    test = false;
                }
                for(int j=0; j<i; j++){
                    if(str[i].equals(str[j])){
                        test = false;
                    }
                }
            }
            if(!test){
                break;
            }
        }
        if(test){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        String[] str = new String[N];
        boolean test = true;
        
        for(int i=0; i<N; i++){
            str[i] = sc.next();
            //System.out.println(str[i]);
            if(i>0){
                //System.out.println(str[i]);
                if(str[i-1].charAt(str[i-1].length()-1)!=str[i].charAt(0)){
                    test = false;
                }
                for(int j=0; j<i; j++){
                    if(str[i].equals(str[j])){
                        test = false;
                    }
                }
            }
            if(!test){
                break;
            }
        }
        if(test){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc String[] str = new String[N]; str new String[N] N boolean test = true; test true for(int i=0; i<N; i++){
            str[i] = sc.next();
            //System.out.println(str[i]);
            if(i>0){
                //System.out.println(str[i]);
                if(str[i-1].charAt(str[i-1].length()-1)!=str[i].charAt(0)){
                    test = false;
                }
                for(int j=0; j<i; j++){
                    if(str[i].equals(str[j])){
                        test = false;
                    }
                }
            }
            if(!test){
                break;
            }
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
            str[i] = sc.next();
            //System.out.println(str[i]);
            if(i>0){
                //System.out.println(str[i]);
                if(str[i-1].charAt(str[i-1].length()-1)!=str[i].charAt(0)){
                    test = false;
                }
                for(int j=0; j<i; j++){
                    if(str[i].equals(str[j])){
                        test = false;
                    }
                }
            }
            if(!test){
                break;
            }
        } {
            str[i] = sc.next();
            //System.out.println(str[i]);
            if(i>0){
                //System.out.println(str[i]);
                if(str[i-1].charAt(str[i-1].length()-1)!=str[i].charAt(0)){
                    test = false;
                }
                for(int j=0; j<i; j++){
                    if(str[i].equals(str[j])){
                        test = false;
                    }
                }
            }
            if(!test){
                break;
            }
        } str[i] = sc.next() str[i] str i sc.next() sc.next sc if(i>0){
                //System.out.println(str[i]);
                if(str[i-1].charAt(str[i-1].length()-1)!=str[i].charAt(0)){
                    test = false;
                }
                for(int j=0; j<i; j++){
                    if(str[i].equals(str[j])){
                        test = false;
                    }
                }
            } i>0 i 0 {
                //System.out.println(str[i]);
                if(str[i-1].charAt(str[i-1].length()-1)!=str[i].charAt(0)){
                    test = false;
                }
                for(int j=0; j<i; j++){
                    if(str[i].equals(str[j])){
                        test = false;
                    }
                }
            } if(str[i-1].charAt(str[i-1].length()-1)!=str[i].charAt(0)){
                    test = false;
                } str[i-1].charAt(str[i-1].length()-1)!=str[i].charAt(0) str[i-1].charAt(str[i-1].length()-1) str[i-1].charAt str[i-1] str i-1 i 1 str[i-1].length()-1 str[i-1].length() str[i-1].length str[i-1] str i-1 i 1 1 str[i].charAt(0) str[i].charAt str[i] str i 0 {
                    test = false;
                } test = false test false for(int j=0; j<i; j++){
                    if(str[i].equals(str[j])){
                        test = false;
                    }
                } int j=0; int j=0; j 0 j<i j i j++ j++ j {
                    if(str[i].equals(str[j])){
                        test = false;
                    }
                } {
                    if(str[i].equals(str[j])){
                        test = false;
                    }
                } if(str[i].equals(str[j])){
                        test = false;
                    } str[i].equals(str[j]) str[i].equals str[i] str i str[j] str j {
                        test = false;
                    } test = false test false if(!test){
                break;
            } !test test {
                break;
            } break; if(test){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        } test {
            System.out.println("Yes");
        } System.out.println("Yes") System.out.println System.out System System.out "Yes" {
            System.out.println("No");
        } System.out.println("No") System.out.println System.out System System.out "No" String[] args args public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        String[] str = new String[N];
        boolean test = true;
        
        for(int i=0; i<N; i++){
            str[i] = sc.next();
            //System.out.println(str[i]);
            if(i>0){
                //System.out.println(str[i]);
                if(str[i-1].charAt(str[i-1].length()-1)!=str[i].charAt(0)){
                    test = false;
                }
                for(int j=0; j<i; j++){
                    if(str[i].equals(str[j])){
                        test = false;
                    }
                }
            }
            if(!test){
                break;
            }
        }
        if(test){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
} public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        String[] str = new String[N];
        boolean test = true;
        
        for(int i=0; i<N; i++){
            str[i] = sc.next();
            //System.out.println(str[i]);
            if(i>0){
                //System.out.println(str[i]);
                if(str[i-1].charAt(str[i-1].length()-1)!=str[i].charAt(0)){
                    test = false;
                }
                for(int j=0; j<i; j++){
                    if(str[i].equals(str[j])){
                        test = false;
                    }
                }
            }
            if(!test){
                break;
            }
        }
        if(test){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        String[] str = new String[N];
        boolean test = true;
        
        for(int i=0; i<N; i++){
            str[i] = sc.next();
            //System.out.println(str[i]);
            if(i>0){
                //System.out.println(str[i]);
                if(str[i-1].charAt(str[i-1].length()-1)!=str[i].charAt(0)){
                    test = false;
                }
                for(int j=0; j<i; j++){
                    if(str[i].equals(str[j])){
                        test = false;
                    }
                }
            }
            if(!test){
                break;
            }
        }
        if(test){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
}