import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        Set<String> words = new HashSet<>();
        
        boolean isOK = true;
        char last = '0';
        for(int i = 0; i < N; i++){
            String W = sc.next();
            
            if(words.contains(W)){
                isOK = false;
                break;
            }
            
            words.add(W);
            
            if( i > 0 && last != W.charAt(0) ){
                isOK = false;
                break;
            }
            
            last = W.charAt(W.length()-1);
        }

        System.out.println( isOK ? "Yes" : "No" );
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        Set<String> words = new HashSet<>();
        
        boolean isOK = true;
        char last = '0';
        for(int i = 0; i < N; i++){
            String W = sc.next();
            
            if(words.contains(W)){
                isOK = false;
                break;
            }
            
            words.add(W);
            
            if( i > 0 && last != W.charAt(0) ){
                isOK = false;
                break;
            }
            
            last = W.charAt(W.length()-1);
        }

        System.out.println( isOK ? "Yes" : "No" );
    }
} Main public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        Set<String> words = new HashSet<>();
        
        boolean isOK = true;
        char last = '0';
        for(int i = 0; i < N; i++){
            String W = sc.next();
            
            if(words.contains(W)){
                isOK = false;
                break;
            }
            
            words.add(W);
            
            if( i > 0 && last != W.charAt(0) ){
                isOK = false;
                break;
            }
            
            last = W.charAt(W.length()-1);
        }

        System.out.println( isOK ? "Yes" : "No" );
    } main {

        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        Set<String> words = new HashSet<>();
        
        boolean isOK = true;
        char last = '0';
        for(int i = 0; i < N; i++){
            String W = sc.next();
            
            if(words.contains(W)){
                isOK = false;
                break;
            }
            
            words.add(W);
            
            if( i > 0 && last != W.charAt(0) ){
                isOK = false;
                break;
            }
            
            last = W.charAt(W.length()-1);
        }

        System.out.println( isOK ? "Yes" : "No" );
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc Set<String> words = new HashSet<>(); words new HashSet<>() boolean isOK = true; isOK true char last = '0'; last '0' for(int i = 0; i < N; i++){
            String W = sc.next();
            
            if(words.contains(W)){
                isOK = false;
                break;
            }
            
            words.add(W);
            
            if( i > 0 && last != W.charAt(0) ){
                isOK = false;
                break;
            }
            
            last = W.charAt(W.length()-1);
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            String W = sc.next();
            
            if(words.contains(W)){
                isOK = false;
                break;
            }
            
            words.add(W);
            
            if( i > 0 && last != W.charAt(0) ){
                isOK = false;
                break;
            }
            
            last = W.charAt(W.length()-1);
        } {
            String W = sc.next();
            
            if(words.contains(W)){
                isOK = false;
                break;
            }
            
            words.add(W);
            
            if( i > 0 && last != W.charAt(0) ){
                isOK = false;
                break;
            }
            
            last = W.charAt(W.length()-1);
        } String W = sc.next(); W sc.next() sc.next sc if(words.contains(W)){
                isOK = false;
                break;
            } words.contains(W) words.contains words W {
                isOK = false;
                break;
            } isOK = false isOK false break; words.add(W) words.add words W if( i > 0 && last != W.charAt(0) ){
                isOK = false;
                break;
            } i > 0 && last != W.charAt(0) i > 0 i 0 last != W.charAt(0) last W.charAt(0) W.charAt W 0 {
                isOK = false;
                break;
            } isOK = false isOK false break; last = W.charAt(W.length()-1) last W.charAt(W.length()-1) W.charAt W W.length()-1 W.length() W.length W 1 System.out.println( isOK ? "Yes" : "No" ) System.out.println System.out System System.out isOK ? "Yes" : "No" isOK "Yes" "No" String[] args args public class Main {
    public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        Set<String> words = new HashSet<>();
        
        boolean isOK = true;
        char last = '0';
        for(int i = 0; i < N; i++){
            String W = sc.next();
            
            if(words.contains(W)){
                isOK = false;
                break;
            }
            
            words.add(W);
            
            if( i > 0 && last != W.charAt(0) ){
                isOK = false;
                break;
            }
            
            last = W.charAt(W.length()-1);
        }

        System.out.println( isOK ? "Yes" : "No" );
    }
} public class Main {
    public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        Set<String> words = new HashSet<>();
        
        boolean isOK = true;
        char last = '0';
        for(int i = 0; i < N; i++){
            String W = sc.next();
            
            if(words.contains(W)){
                isOK = false;
                break;
            }
            
            words.add(W);
            
            if( i > 0 && last != W.charAt(0) ){
                isOK = false;
                break;
            }
            
            last = W.charAt(W.length()-1);
        }

        System.out.println( isOK ? "Yes" : "No" );
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        Set<String> words = new HashSet<>();
        
        boolean isOK = true;
        char last = '0';
        for(int i = 0; i < N; i++){
            String W = sc.next();
            
            if(words.contains(W)){
                isOK = false;
                break;
            }
            
            words.add(W);
            
            if( i > 0 && last != W.charAt(0) ){
                isOK = false;
                break;
            }
            
            last = W.charAt(W.length()-1);
        }

        System.out.println( isOK ? "Yes" : "No" );
    }
}
