import java.util.HashSet;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        
        Scanner sc = new Scanner(System.in);
        
        int n = Integer.parseInt(sc.next());
        String ans = "Yes";
        HashSet<String> set = new HashSet<>();
        String s = sc.next();
        set.add(s);
        char end = s.charAt(s.length()-1);
        
        for(int i = 1; i < n; i++){
            s = sc.next();
            if(set.contains(s) || s.charAt(0) != end){
                ans = "No";
                break;
            }
            set.add(s);
            end = s.charAt(s.length()-1);
        }
        
        System.out.println(ans);
    }
} import java.util.HashSet; HashSet 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 = Integer.parseInt(sc.next());
        String ans = "Yes";
        HashSet<String> set = new HashSet<>();
        String s = sc.next();
        set.add(s);
        char end = s.charAt(s.length()-1);
        
        for(int i = 1; i < n; i++){
            s = sc.next();
            if(set.contains(s) || s.charAt(0) != end){
                ans = "No";
                break;
            }
            set.add(s);
            end = s.charAt(s.length()-1);
        }
        
        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        
        Scanner sc = new Scanner(System.in);
        
        int n = Integer.parseInt(sc.next());
        String ans = "Yes";
        HashSet<String> set = new HashSet<>();
        String s = sc.next();
        set.add(s);
        char end = s.charAt(s.length()-1);
        
        for(int i = 1; i < n; i++){
            s = sc.next();
            if(set.contains(s) || s.charAt(0) != end){
                ans = "No";
                break;
            }
            set.add(s);
            end = s.charAt(s.length()-1);
        }
        
        System.out.println(ans);
    } main {
        
        Scanner sc = new Scanner(System.in);
        
        int n = Integer.parseInt(sc.next());
        String ans = "Yes";
        HashSet<String> set = new HashSet<>();
        String s = sc.next();
        set.add(s);
        char end = s.charAt(s.length()-1);
        
        for(int i = 1; i < n; i++){
            s = sc.next();
            if(set.contains(s) || s.charAt(0) != end){
                ans = "No";
                break;
            }
            set.add(s);
            end = s.charAt(s.length()-1);
        }
        
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc String ans = "Yes"; ans "Yes" HashSet<String> set = new HashSet<>(); set new HashSet<>() String s = sc.next(); s sc.next() sc.next sc set.add(s) set.add set s char end = s.charAt(s.length()-1); end s.charAt(s.length()-1) s.charAt s s.length()-1 s.length() s.length s 1 for(int i = 1; i < n; i++){
            s = sc.next();
            if(set.contains(s) || s.charAt(0) != end){
                ans = "No";
                break;
            }
            set.add(s);
            end = s.charAt(s.length()-1);
        } int i = 1; int i = 1; i 1 i < n i n i++ i++ i {
            s = sc.next();
            if(set.contains(s) || s.charAt(0) != end){
                ans = "No";
                break;
            }
            set.add(s);
            end = s.charAt(s.length()-1);
        } {
            s = sc.next();
            if(set.contains(s) || s.charAt(0) != end){
                ans = "No";
                break;
            }
            set.add(s);
            end = s.charAt(s.length()-1);
        } s = sc.next() s sc.next() sc.next sc if(set.contains(s) || s.charAt(0) != end){
                ans = "No";
                break;
            } set.contains(s) || s.charAt(0) != end set.contains(s) set.contains set s s.charAt(0) != end s.charAt(0) s.charAt s 0 end {
                ans = "No";
                break;
            } ans = "No" ans "No" break; set.add(s) set.add set s end = s.charAt(s.length()-1) end s.charAt(s.length()-1) s.charAt s s.length()-1 s.length() s.length s 1 System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

    public static void main(String[] args) {
        
        Scanner sc = new Scanner(System.in);
        
        int n = Integer.parseInt(sc.next());
        String ans = "Yes";
        HashSet<String> set = new HashSet<>();
        String s = sc.next();
        set.add(s);
        char end = s.charAt(s.length()-1);
        
        for(int i = 1; i < n; i++){
            s = sc.next();
            if(set.contains(s) || s.charAt(0) != end){
                ans = "No";
                break;
            }
            set.add(s);
            end = s.charAt(s.length()-1);
        }
        
        System.out.println(ans);
    }
} public class Main {

    public static void main(String[] args) {
        
        Scanner sc = new Scanner(System.in);
        
        int n = Integer.parseInt(sc.next());
        String ans = "Yes";
        HashSet<String> set = new HashSet<>();
        String s = sc.next();
        set.add(s);
        char end = s.charAt(s.length()-1);
        
        for(int i = 1; i < n; i++){
            s = sc.next();
            if(set.contains(s) || s.charAt(0) != end){
                ans = "No";
                break;
            }
            set.add(s);
            end = s.charAt(s.length()-1);
        }
        
        System.out.println(ans);
    }
} Main
import java.util.HashSet;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        
        Scanner sc = new Scanner(System.in);
        
        int n = Integer.parseInt(sc.next());
        String ans = "Yes";
        HashSet<String> set = new HashSet<>();
        String s = sc.next();
        set.add(s);
        char end = s.charAt(s.length()-1);
        
        for(int i = 1; i < n; i++){
            s = sc.next();
            if(set.contains(s) || s.charAt(0) != end){
                ans = "No";
                break;
            }
            set.add(s);
            end = s.charAt(s.length()-1);
        }
        
        System.out.println(ans);
    }
}