import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();

        Map<String, String> map = new HashMap<>();

        String s = sc.next();
        map.put(s, s);
        for(int i = 0; i < n - 1; i++){
            String next = sc.next();
            if(map.containsKey(next)){
                System.out.println("No");
                return;
            }
            if(s.charAt(s.length() - 1) != next.charAt(0)){
                System.out.println("No");
                return;
            }
            map.put(next, next);
            s = next;
        }

        System.out.println("Yes");

    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();

        Map<String, String> map = new HashMap<>();

        String s = sc.next();
        map.put(s, s);
        for(int i = 0; i < n - 1; i++){
            String next = sc.next();
            if(map.containsKey(next)){
                System.out.println("No");
                return;
            }
            if(s.charAt(s.length() - 1) != next.charAt(0)){
                System.out.println("No");
                return;
            }
            map.put(next, next);
            s = next;
        }

        System.out.println("Yes");

    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();

        Map<String, String> map = new HashMap<>();

        String s = sc.next();
        map.put(s, s);
        for(int i = 0; i < n - 1; i++){
            String next = sc.next();
            if(map.containsKey(next)){
                System.out.println("No");
                return;
            }
            if(s.charAt(s.length() - 1) != next.charAt(0)){
                System.out.println("No");
                return;
            }
            map.put(next, next);
            s = next;
        }

        System.out.println("Yes");

    } main {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();

        Map<String, String> map = new HashMap<>();

        String s = sc.next();
        map.put(s, s);
        for(int i = 0; i < n - 1; i++){
            String next = sc.next();
            if(map.containsKey(next)){
                System.out.println("No");
                return;
            }
            if(s.charAt(s.length() - 1) != next.charAt(0)){
                System.out.println("No");
                return;
            }
            map.put(next, next);
            s = next;
        }

        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 Map<String, String> map = new HashMap<>(); map new HashMap<>() String s = sc.next(); s sc.next() sc.next sc map.put(s, s) map.put map s s for(int i = 0; i < n - 1; i++){
            String next = sc.next();
            if(map.containsKey(next)){
                System.out.println("No");
                return;
            }
            if(s.charAt(s.length() - 1) != next.charAt(0)){
                System.out.println("No");
                return;
            }
            map.put(next, next);
            s = next;
        } int i = 0; int i = 0; i 0 i < n - 1 i n - 1 n 1 i++ i++ i {
            String next = sc.next();
            if(map.containsKey(next)){
                System.out.println("No");
                return;
            }
            if(s.charAt(s.length() - 1) != next.charAt(0)){
                System.out.println("No");
                return;
            }
            map.put(next, next);
            s = next;
        } {
            String next = sc.next();
            if(map.containsKey(next)){
                System.out.println("No");
                return;
            }
            if(s.charAt(s.length() - 1) != next.charAt(0)){
                System.out.println("No");
                return;
            }
            map.put(next, next);
            s = next;
        } String next = sc.next(); next sc.next() sc.next sc if(map.containsKey(next)){
                System.out.println("No");
                return;
            } map.containsKey(next) map.containsKey map next {
                System.out.println("No");
                return;
            } System.out.println("No") System.out.println System.out System System.out "No" return; if(s.charAt(s.length() - 1) != next.charAt(0)){
                System.out.println("No");
                return;
            } s.charAt(s.length() - 1) != next.charAt(0) s.charAt(s.length() - 1) s.charAt s s.length() - 1 s.length() s.length s 1 next.charAt(0) next.charAt next 0 {
                System.out.println("No");
                return;
            } System.out.println("No") System.out.println System.out System System.out "No" return; map.put(next, next) map.put map next next s = next s next 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){
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();

        Map<String, String> map = new HashMap<>();

        String s = sc.next();
        map.put(s, s);
        for(int i = 0; i < n - 1; i++){
            String next = sc.next();
            if(map.containsKey(next)){
                System.out.println("No");
                return;
            }
            if(s.charAt(s.length() - 1) != next.charAt(0)){
                System.out.println("No");
                return;
            }
            map.put(next, next);
            s = next;
        }

        System.out.println("Yes");

    }
} public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();

        Map<String, String> map = new HashMap<>();

        String s = sc.next();
        map.put(s, s);
        for(int i = 0; i < n - 1; i++){
            String next = sc.next();
            if(map.containsKey(next)){
                System.out.println("No");
                return;
            }
            if(s.charAt(s.length() - 1) != next.charAt(0)){
                System.out.println("No");
                return;
            }
            map.put(next, next);
            s = next;
        }

        System.out.println("Yes");

    }
} Main
import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();

        Map<String, String> map = new HashMap<>();

        String s = sc.next();
        map.put(s, s);
        for(int i = 0; i < n - 1; i++){
            String next = sc.next();
            if(map.containsKey(next)){
                System.out.println("No");
                return;
            }
            if(s.charAt(s.length() - 1) != next.charAt(0)){
                System.out.println("No");
                return;
            }
            map.put(next, next);
            s = next;
        }

        System.out.println("Yes");

    }
}
