import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        List<String> W = new ArrayList<String>();
        String preWordEnd = new String();
        boolean ans = true;
        for(int i = 0; i < N; i++){
            String s = sc.next();
            if(i != 0){
                if(W.contains(s) || !s.startsWith(preWordEnd)) {
                    ans = false;
                    break;
                }
            }
            W.add(s);
            preWordEnd = s.substring(s.length()-1, s.length());
        }
        if(ans) System.out.println("Yes");
        else System.out.println("No");
        sc.close();

    }

} import java.util.ArrayList; ArrayList java.util import java.util.List; List 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 = sc.nextInt();
        List<String> W = new ArrayList<String>();
        String preWordEnd = new String();
        boolean ans = true;
        for(int i = 0; i < N; i++){
            String s = sc.next();
            if(i != 0){
                if(W.contains(s) || !s.startsWith(preWordEnd)) {
                    ans = false;
                    break;
                }
            }
            W.add(s);
            preWordEnd = s.substring(s.length()-1, s.length());
        }
        if(ans) System.out.println("Yes");
        else System.out.println("No");
        sc.close();

    }

} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        List<String> W = new ArrayList<String>();
        String preWordEnd = new String();
        boolean ans = true;
        for(int i = 0; i < N; i++){
            String s = sc.next();
            if(i != 0){
                if(W.contains(s) || !s.startsWith(preWordEnd)) {
                    ans = false;
                    break;
                }
            }
            W.add(s);
            preWordEnd = s.substring(s.length()-1, s.length());
        }
        if(ans) System.out.println("Yes");
        else System.out.println("No");
        sc.close();

    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        List<String> W = new ArrayList<String>();
        String preWordEnd = new String();
        boolean ans = true;
        for(int i = 0; i < N; i++){
            String s = sc.next();
            if(i != 0){
                if(W.contains(s) || !s.startsWith(preWordEnd)) {
                    ans = false;
                    break;
                }
            }
            W.add(s);
            preWordEnd = s.substring(s.length()-1, s.length());
        }
        if(ans) System.out.println("Yes");
        else System.out.println("No");
        sc.close();

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc List<String> W = new ArrayList<String>(); W new ArrayList<String>() String preWordEnd = new String(); preWordEnd new String() boolean ans = true; ans true for(int i = 0; i < N; i++){
            String s = sc.next();
            if(i != 0){
                if(W.contains(s) || !s.startsWith(preWordEnd)) {
                    ans = false;
                    break;
                }
            }
            W.add(s);
            preWordEnd = s.substring(s.length()-1, s.length());
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            String s = sc.next();
            if(i != 0){
                if(W.contains(s) || !s.startsWith(preWordEnd)) {
                    ans = false;
                    break;
                }
            }
            W.add(s);
            preWordEnd = s.substring(s.length()-1, s.length());
        } {
            String s = sc.next();
            if(i != 0){
                if(W.contains(s) || !s.startsWith(preWordEnd)) {
                    ans = false;
                    break;
                }
            }
            W.add(s);
            preWordEnd = s.substring(s.length()-1, s.length());
        } String s = sc.next(); s sc.next() sc.next sc if(i != 0){
                if(W.contains(s) || !s.startsWith(preWordEnd)) {
                    ans = false;
                    break;
                }
            } i != 0 i 0 {
                if(W.contains(s) || !s.startsWith(preWordEnd)) {
                    ans = false;
                    break;
                }
            } if(W.contains(s) || !s.startsWith(preWordEnd)) {
                    ans = false;
                    break;
                } W.contains(s) || !s.startsWith(preWordEnd) W.contains(s) W.contains W s !s.startsWith(preWordEnd) s.startsWith(preWordEnd) s.startsWith s preWordEnd {
                    ans = false;
                    break;
                } ans = false ans false break; W.add(s) W.add W s preWordEnd = s.substring(s.length()-1, s.length()) preWordEnd s.substring(s.length()-1, s.length()) s.substring s s.length()-1 s.length() s.length s 1 s.length() s.length s if(ans) System.out.println("Yes");
        else System.out.println("No"); ans System.out.println("Yes") System.out.println System.out System System.out "Yes" System.out.println("No") System.out.println System.out System System.out "No" sc.close() sc.close sc String[] args args public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        List<String> W = new ArrayList<String>();
        String preWordEnd = new String();
        boolean ans = true;
        for(int i = 0; i < N; i++){
            String s = sc.next();
            if(i != 0){
                if(W.contains(s) || !s.startsWith(preWordEnd)) {
                    ans = false;
                    break;
                }
            }
            W.add(s);
            preWordEnd = s.substring(s.length()-1, s.length());
        }
        if(ans) System.out.println("Yes");
        else System.out.println("No");
        sc.close();

    }

} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        List<String> W = new ArrayList<String>();
        String preWordEnd = new String();
        boolean ans = true;
        for(int i = 0; i < N; i++){
            String s = sc.next();
            if(i != 0){
                if(W.contains(s) || !s.startsWith(preWordEnd)) {
                    ans = false;
                    break;
                }
            }
            W.add(s);
            preWordEnd = s.substring(s.length()-1, s.length());
        }
        if(ans) System.out.println("Yes");
        else System.out.println("No");
        sc.close();

    }

} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        List<String> W = new ArrayList<String>();
        String preWordEnd = new String();
        boolean ans = true;
        for(int i = 0; i < N; i++){
            String s = sc.next();
            if(i != 0){
                if(W.contains(s) || !s.startsWith(preWordEnd)) {
                    ans = false;
                    break;
                }
            }
            W.add(s);
            preWordEnd = s.substring(s.length()-1, s.length());
        }
        if(ans) System.out.println("Yes");
        else System.out.println("No");
        sc.close();

    }

}
