import java.util.*;
public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Set<String> set = new HashSet<>();
        char end = '0';
        for(int i = 0; i < n; i++){
            String w = sc.next();
            if(i != 0){
                if(set.contains(w) || end != w.charAt(0)){
                    System.out.println("No");
                    return;
                }
            }
            end = w.charAt(w.length()-1);
            set.add(w);

        }
        System.out.println("Yes");
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Set<String> set = new HashSet<>();
        char end = '0';
        for(int i = 0; i < n; i++){
            String w = sc.next();
            if(i != 0){
                if(set.contains(w) || end != w.charAt(0)){
                    System.out.println("No");
                    return;
                }
            }
            end = w.charAt(w.length()-1);
            set.add(w);

        }
        System.out.println("Yes");
    }
} Main public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Set<String> set = new HashSet<>();
        char end = '0';
        for(int i = 0; i < n; i++){
            String w = sc.next();
            if(i != 0){
                if(set.contains(w) || end != w.charAt(0)){
                    System.out.println("No");
                    return;
                }
            }
            end = w.charAt(w.length()-1);
            set.add(w);

        }
        System.out.println("Yes");
    } main {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Set<String> set = new HashSet<>();
        char end = '0';
        for(int i = 0; i < n; i++){
            String w = sc.next();
            if(i != 0){
                if(set.contains(w) || end != w.charAt(0)){
                    System.out.println("No");
                    return;
                }
            }
            end = w.charAt(w.length()-1);
            set.add(w);

        }
        System.out.println("Yes");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc Set<String> set = new HashSet<>(); set new HashSet<>() char end = '0'; end '0' for(int i = 0; i < n; i++){
            String w = sc.next();
            if(i != 0){
                if(set.contains(w) || end != w.charAt(0)){
                    System.out.println("No");
                    return;
                }
            }
            end = w.charAt(w.length()-1);
            set.add(w);

        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            String w = sc.next();
            if(i != 0){
                if(set.contains(w) || end != w.charAt(0)){
                    System.out.println("No");
                    return;
                }
            }
            end = w.charAt(w.length()-1);
            set.add(w);

        } {
            String w = sc.next();
            if(i != 0){
                if(set.contains(w) || end != w.charAt(0)){
                    System.out.println("No");
                    return;
                }
            }
            end = w.charAt(w.length()-1);
            set.add(w);

        } String w = sc.next(); w sc.next() sc.next sc if(i != 0){
                if(set.contains(w) || end != w.charAt(0)){
                    System.out.println("No");
                    return;
                }
            } i != 0 i 0 {
                if(set.contains(w) || end != w.charAt(0)){
                    System.out.println("No");
                    return;
                }
            } if(set.contains(w) || end != w.charAt(0)){
                    System.out.println("No");
                    return;
                } set.contains(w) || end != w.charAt(0) set.contains(w) set.contains set w end != w.charAt(0) end w.charAt(0) w.charAt w 0 {
                    System.out.println("No");
                    return;
                } System.out.println("No") System.out.println System.out System System.out "No" return; end = w.charAt(w.length()-1) end w.charAt(w.length()-1) w.charAt w w.length()-1 w.length() w.length w 1 set.add(w) set.add set w System.out.println("Yes") System.out.println System.out System System.out "Yes" String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Set<String> set = new HashSet<>();
        char end = '0';
        for(int i = 0; i < n; i++){
            String w = sc.next();
            if(i != 0){
                if(set.contains(w) || end != w.charAt(0)){
                    System.out.println("No");
                    return;
                }
            }
            end = w.charAt(w.length()-1);
            set.add(w);

        }
        System.out.println("Yes");
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Set<String> set = new HashSet<>();
        char end = '0';
        for(int i = 0; i < n; i++){
            String w = sc.next();
            if(i != 0){
                if(set.contains(w) || end != w.charAt(0)){
                    System.out.println("No");
                    return;
                }
            }
            end = w.charAt(w.length()-1);
            set.add(w);

        }
        System.out.println("Yes");
    }
} Main
import java.util.*;
public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Set<String> set = new HashSet<>();
        char end = '0';
        for(int i = 0; i < n; i++){
            String w = sc.next();
            if(i != 0){
                if(set.contains(w) || end != w.charAt(0)){
                    System.out.println("No");
                    return;
                }
            }
            end = w.charAt(w.length()-1);
            set.add(w);

        }
        System.out.println("Yes");
    }
}
