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