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

        for(int i = 0;i<n;i++){
            String a = sc.next();

            if(list.contains(a)){
                cnt++;
            }
            list.add(a);
        }

    

        for(int i =0;i<list.size()-1;i++){
            String b = list.get(i);
            String c = list.get(i+1);

            if(b.charAt(b.length()-1)!=c.charAt(0)){
                cnt++;
               // System.out.println(b.charAt(b.length()-1));
                //System.out.println(c.charAt(0));
            }
        }

        if(cnt==0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }

        //System.out.println(cnt);

    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        List<String> list  = new ArrayList<>();
        int cnt =0;

        for(int i = 0;i<n;i++){
            String a = sc.next();

            if(list.contains(a)){
                cnt++;
            }
            list.add(a);
        }

    

        for(int i =0;i<list.size()-1;i++){
            String b = list.get(i);
            String c = list.get(i+1);

            if(b.charAt(b.length()-1)!=c.charAt(0)){
                cnt++;
               // System.out.println(b.charAt(b.length()-1));
                //System.out.println(c.charAt(0));
            }
        }

        if(cnt==0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }

        //System.out.println(cnt);

    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        List<String> list  = new ArrayList<>();
        int cnt =0;

        for(int i = 0;i<n;i++){
            String a = sc.next();

            if(list.contains(a)){
                cnt++;
            }
            list.add(a);
        }

    

        for(int i =0;i<list.size()-1;i++){
            String b = list.get(i);
            String c = list.get(i+1);

            if(b.charAt(b.length()-1)!=c.charAt(0)){
                cnt++;
               // System.out.println(b.charAt(b.length()-1));
                //System.out.println(c.charAt(0));
            }
        }

        if(cnt==0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }

        //System.out.println(cnt);

    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        List<String> list  = new ArrayList<>();
        int cnt =0;

        for(int i = 0;i<n;i++){
            String a = sc.next();

            if(list.contains(a)){
                cnt++;
            }
            list.add(a);
        }

    

        for(int i =0;i<list.size()-1;i++){
            String b = list.get(i);
            String c = list.get(i+1);

            if(b.charAt(b.length()-1)!=c.charAt(0)){
                cnt++;
               // System.out.println(b.charAt(b.length()-1));
                //System.out.println(c.charAt(0));
            }
        }

        if(cnt==0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }

        //System.out.println(cnt);

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc List<String> list  = new ArrayList<>(); list new ArrayList<>() int cnt =0; cnt 0 for(int i = 0;i<n;i++){
            String a = sc.next();

            if(list.contains(a)){
                cnt++;
            }
            list.add(a);
        } int i = 0; int i = 0; i 0 i<n i n i++ i++ i {
            String a = sc.next();

            if(list.contains(a)){
                cnt++;
            }
            list.add(a);
        } {
            String a = sc.next();

            if(list.contains(a)){
                cnt++;
            }
            list.add(a);
        } String a = sc.next(); a sc.next() sc.next sc if(list.contains(a)){
                cnt++;
            } list.contains(a) list.contains list a {
                cnt++;
            } cnt++ cnt list.add(a) list.add list a for(int i =0;i<list.size()-1;i++){
            String b = list.get(i);
            String c = list.get(i+1);

            if(b.charAt(b.length()-1)!=c.charAt(0)){
                cnt++;
               // System.out.println(b.charAt(b.length()-1));
                //System.out.println(c.charAt(0));
            }
        } int i =0; int i =0; i 0 i<list.size()-1 i list.size()-1 list.size() list.size list 1 i++ i++ i {
            String b = list.get(i);
            String c = list.get(i+1);

            if(b.charAt(b.length()-1)!=c.charAt(0)){
                cnt++;
               // System.out.println(b.charAt(b.length()-1));
                //System.out.println(c.charAt(0));
            }
        } {
            String b = list.get(i);
            String c = list.get(i+1);

            if(b.charAt(b.length()-1)!=c.charAt(0)){
                cnt++;
               // System.out.println(b.charAt(b.length()-1));
                //System.out.println(c.charAt(0));
            }
        } String b = list.get(i); b list.get(i) list.get list i String c = list.get(i+1); c list.get(i+1) list.get list i+1 i 1 if(b.charAt(b.length()-1)!=c.charAt(0)){
                cnt++;
               // System.out.println(b.charAt(b.length()-1));
                //System.out.println(c.charAt(0));
            } b.charAt(b.length()-1)!=c.charAt(0) b.charAt(b.length()-1) b.charAt b b.length()-1 b.length() b.length b 1 c.charAt(0) c.charAt c 0 {
                cnt++;
               // System.out.println(b.charAt(b.length()-1));
                //System.out.println(c.charAt(0));
            } cnt++ cnt if(cnt==0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        } cnt==0 cnt 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" String[] args args public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        List<String> list  = new ArrayList<>();
        int cnt =0;

        for(int i = 0;i<n;i++){
            String a = sc.next();

            if(list.contains(a)){
                cnt++;
            }
            list.add(a);
        }

    

        for(int i =0;i<list.size()-1;i++){
            String b = list.get(i);
            String c = list.get(i+1);

            if(b.charAt(b.length()-1)!=c.charAt(0)){
                cnt++;
               // System.out.println(b.charAt(b.length()-1));
                //System.out.println(c.charAt(0));
            }
        }

        if(cnt==0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }

        //System.out.println(cnt);

    }
} public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        List<String> list  = new ArrayList<>();
        int cnt =0;

        for(int i = 0;i<n;i++){
            String a = sc.next();

            if(list.contains(a)){
                cnt++;
            }
            list.add(a);
        }

    

        for(int i =0;i<list.size()-1;i++){
            String b = list.get(i);
            String c = list.get(i+1);

            if(b.charAt(b.length()-1)!=c.charAt(0)){
                cnt++;
               // System.out.println(b.charAt(b.length()-1));
                //System.out.println(c.charAt(0));
            }
        }

        if(cnt==0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }

        //System.out.println(cnt);

    }
} Main
import java.util.*;
public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        List<String> list  = new ArrayList<>();
        int cnt =0;

        for(int i = 0;i<n;i++){
            String a = sc.next();

            if(list.contains(a)){
                cnt++;
            }
            list.add(a);
        }

    

        for(int i =0;i<list.size()-1;i++){
            String b = list.get(i);
            String c = list.get(i+1);

            if(b.charAt(b.length()-1)!=c.charAt(0)){
                cnt++;
               // System.out.println(b.charAt(b.length()-1));
                //System.out.println(c.charAt(0));
            }
        }

        if(cnt==0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }

        //System.out.println(cnt);

    }
}
