import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        String previousWord = "";
        String nextword = "~";
        boolean isYes = true;

        Map resultMap = new HashMap();

        for(int i = 0; i<N; i++){

            nextword = sc.next();
            if(previousWord == ""){
                previousWord = nextword.substring(0,1);
            }

            if(previousWord.charAt(previousWord.length()-1) != nextword.charAt(0)){
                isYes = false;
                break;
            }
            if(resultMap.containsKey(nextword)){
                isYes = false;
                break;
            }
            resultMap.put(nextword,"");
            previousWord = nextword;
        }

        if(isYes){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
} import java.util.HashMap; HashMap java.util import java.util.Map; Map 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 previousWord = "";
        String nextword = "~";
        boolean isYes = true;

        Map resultMap = new HashMap();

        for(int i = 0; i<N; i++){

            nextword = sc.next();
            if(previousWord == ""){
                previousWord = nextword.substring(0,1);
            }

            if(previousWord.charAt(previousWord.length()-1) != nextword.charAt(0)){
                isYes = false;
                break;
            }
            if(resultMap.containsKey(nextword)){
                isYes = false;
                break;
            }
            resultMap.put(nextword,"");
            previousWord = nextword;
        }

        if(isYes){
            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 previousWord = "";
        String nextword = "~";
        boolean isYes = true;

        Map resultMap = new HashMap();

        for(int i = 0; i<N; i++){

            nextword = sc.next();
            if(previousWord == ""){
                previousWord = nextword.substring(0,1);
            }

            if(previousWord.charAt(previousWord.length()-1) != nextword.charAt(0)){
                isYes = false;
                break;
            }
            if(resultMap.containsKey(nextword)){
                isYes = false;
                break;
            }
            resultMap.put(nextword,"");
            previousWord = nextword;
        }

        if(isYes){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        String previousWord = "";
        String nextword = "~";
        boolean isYes = true;

        Map resultMap = new HashMap();

        for(int i = 0; i<N; i++){

            nextword = sc.next();
            if(previousWord == ""){
                previousWord = nextword.substring(0,1);
            }

            if(previousWord.charAt(previousWord.length()-1) != nextword.charAt(0)){
                isYes = false;
                break;
            }
            if(resultMap.containsKey(nextword)){
                isYes = false;
                break;
            }
            resultMap.put(nextword,"");
            previousWord = nextword;
        }

        if(isYes){
            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 previousWord = ""; previousWord "" String nextword = "~"; nextword "~" boolean isYes = true; isYes true Map resultMap = new HashMap(); resultMap new HashMap() for(int i = 0; i<N; i++){

            nextword = sc.next();
            if(previousWord == ""){
                previousWord = nextword.substring(0,1);
            }

            if(previousWord.charAt(previousWord.length()-1) != nextword.charAt(0)){
                isYes = false;
                break;
            }
            if(resultMap.containsKey(nextword)){
                isYes = false;
                break;
            }
            resultMap.put(nextword,"");
            previousWord = nextword;
        } int i = 0; int i = 0; i 0 i<N i N i++ i++ i {

            nextword = sc.next();
            if(previousWord == ""){
                previousWord = nextword.substring(0,1);
            }

            if(previousWord.charAt(previousWord.length()-1) != nextword.charAt(0)){
                isYes = false;
                break;
            }
            if(resultMap.containsKey(nextword)){
                isYes = false;
                break;
            }
            resultMap.put(nextword,"");
            previousWord = nextword;
        } {

            nextword = sc.next();
            if(previousWord == ""){
                previousWord = nextword.substring(0,1);
            }

            if(previousWord.charAt(previousWord.length()-1) != nextword.charAt(0)){
                isYes = false;
                break;
            }
            if(resultMap.containsKey(nextword)){
                isYes = false;
                break;
            }
            resultMap.put(nextword,"");
            previousWord = nextword;
        } nextword = sc.next() nextword sc.next() sc.next sc if(previousWord == ""){
                previousWord = nextword.substring(0,1);
            } previousWord == "" previousWord "" {
                previousWord = nextword.substring(0,1);
            } previousWord = nextword.substring(0,1) previousWord nextword.substring(0,1) nextword.substring nextword 0 1 if(previousWord.charAt(previousWord.length()-1) != nextword.charAt(0)){
                isYes = false;
                break;
            } previousWord.charAt(previousWord.length()-1) != nextword.charAt(0) previousWord.charAt(previousWord.length()-1) previousWord.charAt previousWord previousWord.length()-1 previousWord.length() previousWord.length previousWord 1 nextword.charAt(0) nextword.charAt nextword 0 {
                isYes = false;
                break;
            } isYes = false isYes false break; if(resultMap.containsKey(nextword)){
                isYes = false;
                break;
            } resultMap.containsKey(nextword) resultMap.containsKey resultMap nextword {
                isYes = false;
                break;
            } isYes = false isYes false break; resultMap.put(nextword,"") resultMap.put resultMap nextword "" previousWord = nextword previousWord nextword if(isYes){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        } isYes {
            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 previousWord = "";
        String nextword = "~";
        boolean isYes = true;

        Map resultMap = new HashMap();

        for(int i = 0; i<N; i++){

            nextword = sc.next();
            if(previousWord == ""){
                previousWord = nextword.substring(0,1);
            }

            if(previousWord.charAt(previousWord.length()-1) != nextword.charAt(0)){
                isYes = false;
                break;
            }
            if(resultMap.containsKey(nextword)){
                isYes = false;
                break;
            }
            resultMap.put(nextword,"");
            previousWord = nextword;
        }

        if(isYes){
            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 previousWord = "";
        String nextword = "~";
        boolean isYes = true;

        Map resultMap = new HashMap();

        for(int i = 0; i<N; i++){

            nextword = sc.next();
            if(previousWord == ""){
                previousWord = nextword.substring(0,1);
            }

            if(previousWord.charAt(previousWord.length()-1) != nextword.charAt(0)){
                isYes = false;
                break;
            }
            if(resultMap.containsKey(nextword)){
                isYes = false;
                break;
            }
            resultMap.put(nextword,"");
            previousWord = nextword;
        }

        if(isYes){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
} Main
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        String previousWord = "";
        String nextword = "~";
        boolean isYes = true;

        Map resultMap = new HashMap();

        for(int i = 0; i<N; i++){

            nextword = sc.next();
            if(previousWord == ""){
                previousWord = nextword.substring(0,1);
            }

            if(previousWord.charAt(previousWord.length()-1) != nextword.charAt(0)){
                isYes = false;
                break;
            }
            if(resultMap.containsKey(nextword)){
                isYes = false;
                break;
            }
            resultMap.put(nextword,"");
            previousWord = nextword;
        }

        if(isYes){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
}