import java.util.ArrayList;
import java.util.Scanner;
public class Main {
    public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String[]W = new String[n];
        ArrayList<String>ans  = new ArrayList<>();

    for(int i=0; i<n; i++) {
    	W[i] = sc.next();
    	if(!ans.contains(W[i])){		
    	      ans.add(W[i]);
    	}
    }
    int cou = 0;
    for(int i=0; i<n-1; i++) {
    	if(W[i].charAt(W[i].length()-1) != W[i+1].charAt(0)) {
    		cou++;
    	}
    }
    	if(ans.size() == n){
    		if(cou == 0) {
    		  	System.out.println("Yes");
    		}else {
    			System.out.println("No");
    		}
    	}else {
    			System.out.println("No");
    		}
}
} import java.util.ArrayList; ArrayList java.util 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();
    String[]W = new String[n];
        ArrayList<String>ans  = new ArrayList<>();

    for(int i=0; i<n; i++) {
    	W[i] = sc.next();
    	if(!ans.contains(W[i])){		
    	      ans.add(W[i]);
    	}
    }
    int cou = 0;
    for(int i=0; i<n-1; i++) {
    	if(W[i].charAt(W[i].length()-1) != W[i+1].charAt(0)) {
    		cou++;
    	}
    }
    	if(ans.size() == n){
    		if(cou == 0) {
    		  	System.out.println("Yes");
    		}else {
    			System.out.println("No");
    		}
    	}else {
    			System.out.println("No");
    		}
}
} Main public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String[]W = new String[n];
        ArrayList<String>ans  = new ArrayList<>();

    for(int i=0; i<n; i++) {
    	W[i] = sc.next();
    	if(!ans.contains(W[i])){		
    	      ans.add(W[i]);
    	}
    }
    int cou = 0;
    for(int i=0; i<n-1; i++) {
    	if(W[i].charAt(W[i].length()-1) != W[i+1].charAt(0)) {
    		cou++;
    	}
    }
    	if(ans.size() == n){
    		if(cou == 0) {
    		  	System.out.println("Yes");
    		}else {
    			System.out.println("No");
    		}
    	}else {
    			System.out.println("No");
    		}
} main {
    
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String[]W = new String[n];
        ArrayList<String>ans  = new ArrayList<>();

    for(int i=0; i<n; i++) {
    	W[i] = sc.next();
    	if(!ans.contains(W[i])){		
    	      ans.add(W[i]);
    	}
    }
    int cou = 0;
    for(int i=0; i<n-1; i++) {
    	if(W[i].charAt(W[i].length()-1) != W[i+1].charAt(0)) {
    		cou++;
    	}
    }
    	if(ans.size() == n){
    		if(cou == 0) {
    		  	System.out.println("Yes");
    		}else {
    			System.out.println("No");
    		}
    	}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[]W = new String[n]; W new String[n] n ArrayList<String>ans  = new ArrayList<>(); ans new ArrayList<>() for(int i=0; i<n; i++) {
    	W[i] = sc.next();
    	if(!ans.contains(W[i])){		
    	      ans.add(W[i]);
    	}
    } int i=0; int i=0; i 0 i<n i n i++ i++ i {
    	W[i] = sc.next();
    	if(!ans.contains(W[i])){		
    	      ans.add(W[i]);
    	}
    } {
    	W[i] = sc.next();
    	if(!ans.contains(W[i])){		
    	      ans.add(W[i]);
    	}
    } W[i] = sc.next() W[i] W i sc.next() sc.next sc if(!ans.contains(W[i])){		
    	      ans.add(W[i]);
    	} !ans.contains(W[i]) ans.contains(W[i]) ans.contains ans W[i] W i {		
    	      ans.add(W[i]);
    	} ans.add(W[i]) ans.add ans W[i] W i int cou = 0; cou 0 for(int i=0; i<n-1; i++) {
    	if(W[i].charAt(W[i].length()-1) != W[i+1].charAt(0)) {
    		cou++;
    	}
    } int i=0; int i=0; i 0 i<n-1 i n-1 n 1 i++ i++ i {
    	if(W[i].charAt(W[i].length()-1) != W[i+1].charAt(0)) {
    		cou++;
    	}
    } {
    	if(W[i].charAt(W[i].length()-1) != W[i+1].charAt(0)) {
    		cou++;
    	}
    } if(W[i].charAt(W[i].length()-1) != W[i+1].charAt(0)) {
    		cou++;
    	} W[i].charAt(W[i].length()-1) != W[i+1].charAt(0) W[i].charAt(W[i].length()-1) W[i].charAt W[i] W i W[i].length()-1 W[i].length() W[i].length W[i] W i 1 W[i+1].charAt(0) W[i+1].charAt W[i+1] W i+1 i 1 0 {
    		cou++;
    	} cou++ cou if(ans.size() == n){
    		if(cou == 0) {
    		  	System.out.println("Yes");
    		}else {
    			System.out.println("No");
    		}
    	}else {
    			System.out.println("No");
    		} ans.size() == n ans.size() ans.size ans n {
    		if(cou == 0) {
    		  	System.out.println("Yes");
    		}else {
    			System.out.println("No");
    		}
    	} if(cou == 0) {
    		  	System.out.println("Yes");
    		}else {
    			System.out.println("No");
    		} cou == 0 cou 0 {
    		  	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" {
    			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[]W = new String[n];
        ArrayList<String>ans  = new ArrayList<>();

    for(int i=0; i<n; i++) {
    	W[i] = sc.next();
    	if(!ans.contains(W[i])){		
    	      ans.add(W[i]);
    	}
    }
    int cou = 0;
    for(int i=0; i<n-1; i++) {
    	if(W[i].charAt(W[i].length()-1) != W[i+1].charAt(0)) {
    		cou++;
    	}
    }
    	if(ans.size() == n){
    		if(cou == 0) {
    		  	System.out.println("Yes");
    		}else {
    			System.out.println("No");
    		}
    	}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[]W = new String[n];
        ArrayList<String>ans  = new ArrayList<>();

    for(int i=0; i<n; i++) {
    	W[i] = sc.next();
    	if(!ans.contains(W[i])){		
    	      ans.add(W[i]);
    	}
    }
    int cou = 0;
    for(int i=0; i<n-1; i++) {
    	if(W[i].charAt(W[i].length()-1) != W[i+1].charAt(0)) {
    		cou++;
    	}
    }
    	if(ans.size() == n){
    		if(cou == 0) {
    		  	System.out.println("Yes");
    		}else {
    			System.out.println("No");
    		}
    	}else {
    			System.out.println("No");
    		}
}
} Main
import java.util.ArrayList;
import java.util.Scanner;
public class Main {
    public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String[]W = new String[n];
        ArrayList<String>ans  = new ArrayList<>();

    for(int i=0; i<n; i++) {
    	W[i] = sc.next();
    	if(!ans.contains(W[i])){		
    	      ans.add(W[i]);
    	}
    }
    int cou = 0;
    for(int i=0; i<n-1; i++) {
    	if(W[i].charAt(W[i].length()-1) != W[i+1].charAt(0)) {
    		cou++;
    	}
    }
    	if(ans.size() == n){
    		if(cou == 0) {
    		  	System.out.println("Yes");
    		}else {
    			System.out.println("No");
    		}
    	}else {
    			System.out.println("No");
    		}
}
}