import java.util.*;
import java.io.*;
import java.math.*;
 
public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        char last = 'a';
        HashSet<String> hs = new HashSet<>();
        for(int i = 0; i < n; i++){
            String s = sc.next();
            hs.add(s);
            if(last == s.charAt(0) || i == 0){
                last = s.charAt(s.length()-1);
            } else {
                System.out.println("No");
                return;
            }
        }
        if(n == hs.size()){
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} import java.util.*; util.* java import java.io.*; io.* java import java.math.*; math.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        char last = 'a';
        HashSet<String> hs = new HashSet<>();
        for(int i = 0; i < n; i++){
            String s = sc.next();
            hs.add(s);
            if(last == s.charAt(0) || i == 0){
                last = s.charAt(s.length()-1);
            } else {
                System.out.println("No");
                return;
            }
        }
        if(n == hs.size()){
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        char last = 'a';
        HashSet<String> hs = new HashSet<>();
        for(int i = 0; i < n; i++){
            String s = sc.next();
            hs.add(s);
            if(last == s.charAt(0) || i == 0){
                last = s.charAt(s.length()-1);
            } else {
                System.out.println("No");
                return;
            }
        }
        if(n == hs.size()){
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        char last = 'a';
        HashSet<String> hs = new HashSet<>();
        for(int i = 0; i < n; i++){
            String s = sc.next();
            hs.add(s);
            if(last == s.charAt(0) || i == 0){
                last = s.charAt(s.length()-1);
            } else {
                System.out.println("No");
                return;
            }
        }
        if(n == hs.size()){
            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 char last = 'a'; last 'a' HashSet<String> hs = new HashSet<>(); hs new HashSet<>() for(int i = 0; i < n; i++){
            String s = sc.next();
            hs.add(s);
            if(last == s.charAt(0) || i == 0){
                last = s.charAt(s.length()-1);
            } else {
                System.out.println("No");
                return;
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            String s = sc.next();
            hs.add(s);
            if(last == s.charAt(0) || i == 0){
                last = s.charAt(s.length()-1);
            } else {
                System.out.println("No");
                return;
            }
        } {
            String s = sc.next();
            hs.add(s);
            if(last == s.charAt(0) || i == 0){
                last = s.charAt(s.length()-1);
            } else {
                System.out.println("No");
                return;
            }
        } String s = sc.next(); s sc.next() sc.next sc hs.add(s) hs.add hs s if(last == s.charAt(0) || i == 0){
                last = s.charAt(s.length()-1);
            } else {
                System.out.println("No");
                return;
            } last == s.charAt(0) || i == 0 last == s.charAt(0) last s.charAt(0) s.charAt s 0 i == 0 i 0 {
                last = s.charAt(s.length()-1);
            } last = s.charAt(s.length()-1) last s.charAt(s.length()-1) s.charAt s s.length()-1 s.length() s.length s 1 {
                System.out.println("No");
                return;
            } System.out.println("No") System.out.println System.out System System.out "No" return; if(n == hs.size()){
            System.out.println("Yes");
        } else {
            System.out.println("No");
        } n == hs.size() n hs.size() hs.size hs {
            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) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        char last = 'a';
        HashSet<String> hs = new HashSet<>();
        for(int i = 0; i < n; i++){
            String s = sc.next();
            hs.add(s);
            if(last == s.charAt(0) || i == 0){
                last = s.charAt(s.length()-1);
            } else {
                System.out.println("No");
                return;
            }
        }
        if(n == hs.size()){
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        char last = 'a';
        HashSet<String> hs = new HashSet<>();
        for(int i = 0; i < n; i++){
            String s = sc.next();
            hs.add(s);
            if(last == s.charAt(0) || i == 0){
                last = s.charAt(s.length()-1);
            } else {
                System.out.println("No");
                return;
            }
        }
        if(n == hs.size()){
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} Main
import java.util.*;
import java.io.*;
import java.math.*;
 
public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        char last = 'a';
        HashSet<String> hs = new HashSet<>();
        for(int i = 0; i < n; i++){
            String s = sc.next();
            hs.add(s);
            if(last == s.charAt(0) || i == 0){
                last = s.charAt(s.length()-1);
            } else {
                System.out.println("No");
                return;
            }
        }
        if(n == hs.size()){
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
}