import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        ArrayList <String> W = new ArrayList <String>();
        boolean judge = true;
        
        for(int i=0; i<N; i++){
            String tmp = sc.next();
            if(W.contains(tmp)){
                judge = false;
            }
            W.add(tmp);
            
        }
        

        for(int i=0; i<N-1; i++){
            String str1 = W.get(i);
            String str2 = W.get(i+1);
            int num = str1.length()-1;
            if(str1.charAt(num) == str2.charAt(0)){
                continue;
            }else{
                judge = false;
                break;
            }
        }
        
        if(judge == true) {
            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();
        ArrayList <String> W = new ArrayList <String>();
        boolean judge = true;
        
        for(int i=0; i<N; i++){
            String tmp = sc.next();
            if(W.contains(tmp)){
                judge = false;
            }
            W.add(tmp);
            
        }
        

        for(int i=0; i<N-1; i++){
            String str1 = W.get(i);
            String str2 = W.get(i+1);
            int num = str1.length()-1;
            if(str1.charAt(num) == str2.charAt(0)){
                continue;
            }else{
                judge = false;
                break;
            }
        }
        
        if(judge == 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();
        ArrayList <String> W = new ArrayList <String>();
        boolean judge = true;
        
        for(int i=0; i<N; i++){
            String tmp = sc.next();
            if(W.contains(tmp)){
                judge = false;
            }
            W.add(tmp);
            
        }
        

        for(int i=0; i<N-1; i++){
            String str1 = W.get(i);
            String str2 = W.get(i+1);
            int num = str1.length()-1;
            if(str1.charAt(num) == str2.charAt(0)){
                continue;
            }else{
                judge = false;
                break;
            }
        }
        
        if(judge == true) {
            System.out.println("Yes");
        }else {
            System.out.println("No");
    
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        ArrayList <String> W = new ArrayList <String>();
        boolean judge = true;
        
        for(int i=0; i<N; i++){
            String tmp = sc.next();
            if(W.contains(tmp)){
                judge = false;
            }
            W.add(tmp);
            
        }
        

        for(int i=0; i<N-1; i++){
            String str1 = W.get(i);
            String str2 = W.get(i+1);
            int num = str1.length()-1;
            if(str1.charAt(num) == str2.charAt(0)){
                continue;
            }else{
                judge = false;
                break;
            }
        }
        
        if(judge == 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 ArrayList <String> W = new ArrayList <String>(); W new ArrayList <String>() boolean judge = true; judge true for(int i=0; i<N; i++){
            String tmp = sc.next();
            if(W.contains(tmp)){
                judge = false;
            }
            W.add(tmp);
            
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
            String tmp = sc.next();
            if(W.contains(tmp)){
                judge = false;
            }
            W.add(tmp);
            
        } {
            String tmp = sc.next();
            if(W.contains(tmp)){
                judge = false;
            }
            W.add(tmp);
            
        } String tmp = sc.next(); tmp sc.next() sc.next sc if(W.contains(tmp)){
                judge = false;
            } W.contains(tmp) W.contains W tmp {
                judge = false;
            } judge = false judge false W.add(tmp) W.add W tmp for(int i=0; i<N-1; i++){
            String str1 = W.get(i);
            String str2 = W.get(i+1);
            int num = str1.length()-1;
            if(str1.charAt(num) == str2.charAt(0)){
                continue;
            }else{
                judge = false;
                break;
            }
        } int i=0; int i=0; i 0 i<N-1 i N-1 N 1 i++ i++ i {
            String str1 = W.get(i);
            String str2 = W.get(i+1);
            int num = str1.length()-1;
            if(str1.charAt(num) == str2.charAt(0)){
                continue;
            }else{
                judge = false;
                break;
            }
        } {
            String str1 = W.get(i);
            String str2 = W.get(i+1);
            int num = str1.length()-1;
            if(str1.charAt(num) == str2.charAt(0)){
                continue;
            }else{
                judge = false;
                break;
            }
        } String str1 = W.get(i); str1 W.get(i) W.get W i String str2 = W.get(i+1); str2 W.get(i+1) W.get W i+1 i 1 int num = str1.length()-1; num str1.length()-1 str1.length() str1.length str1 1 if(str1.charAt(num) == str2.charAt(0)){
                continue;
            }else{
                judge = false;
                break;
            } str1.charAt(num) == str2.charAt(0) str1.charAt(num) str1.charAt str1 num str2.charAt(0) str2.charAt str2 0 {
                continue;
            } continue; {
                judge = false;
                break;
            } judge = false judge false break; if(judge == true) {
            System.out.println("Yes");
        }else {
            System.out.println("No");
    
        } judge == true judge 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();
        ArrayList <String> W = new ArrayList <String>();
        boolean judge = true;
        
        for(int i=0; i<N; i++){
            String tmp = sc.next();
            if(W.contains(tmp)){
                judge = false;
            }
            W.add(tmp);
            
        }
        

        for(int i=0; i<N-1; i++){
            String str1 = W.get(i);
            String str2 = W.get(i+1);
            int num = str1.length()-1;
            if(str1.charAt(num) == str2.charAt(0)){
                continue;
            }else{
                judge = false;
                break;
            }
        }
        
        if(judge == 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();
        ArrayList <String> W = new ArrayList <String>();
        boolean judge = true;
        
        for(int i=0; i<N; i++){
            String tmp = sc.next();
            if(W.contains(tmp)){
                judge = false;
            }
            W.add(tmp);
            
        }
        

        for(int i=0; i<N-1; i++){
            String str1 = W.get(i);
            String str2 = W.get(i+1);
            int num = str1.length()-1;
            if(str1.charAt(num) == str2.charAt(0)){
                continue;
            }else{
                judge = false;
                break;
            }
        }
        
        if(judge == true) {
            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();
        ArrayList <String> W = new ArrayList <String>();
        boolean judge = true;
        
        for(int i=0; i<N; i++){
            String tmp = sc.next();
            if(W.contains(tmp)){
                judge = false;
            }
            W.add(tmp);
            
        }
        

        for(int i=0; i<N-1; i++){
            String str1 = W.get(i);
            String str2 = W.get(i+1);
            int num = str1.length()-1;
            if(str1.charAt(num) == str2.charAt(0)){
                continue;
            }else{
                judge = false;
                break;
            }
        }
        
        if(judge == true) {
            System.out.println("Yes");
        }else {
            System.out.println("No");
    
        }
    }
}
