import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        @SuppressWarnings("resource")
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String[] s = new String[n];
        for (int i = 0 ; i < n ; i++) {
            s[i] = sc.next();
        }
        boolean flg = true;
        for (int i = 0 ; i < n ; i++) {
            for (int j = i + 1 ; j < n ; j++) {
                if (s[i].equals(s[j])) flg = false;
            }
        }
        for (int i = 0 ; i < n - 1 ; i++) {
            if (s[i].charAt(s[i].length() - 1) != s[i + 1].charAt(0)) flg = false;
        }
        System.out.println(flg ? "Yes" : "No");
    }

} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        @SuppressWarnings("resource")
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String[] s = new String[n];
        for (int i = 0 ; i < n ; i++) {
            s[i] = sc.next();
        }
        boolean flg = true;
        for (int i = 0 ; i < n ; i++) {
            for (int j = i + 1 ; j < n ; j++) {
                if (s[i].equals(s[j])) flg = false;
            }
        }
        for (int i = 0 ; i < n - 1 ; i++) {
            if (s[i].charAt(s[i].length() - 1) != s[i + 1].charAt(0)) flg = false;
        }
        System.out.println(flg ? "Yes" : "No");
    }

} Main public static void main(String[] args) {
        @SuppressWarnings("resource")
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String[] s = new String[n];
        for (int i = 0 ; i < n ; i++) {
            s[i] = sc.next();
        }
        boolean flg = true;
        for (int i = 0 ; i < n ; i++) {
            for (int j = i + 1 ; j < n ; j++) {
                if (s[i].equals(s[j])) flg = false;
            }
        }
        for (int i = 0 ; i < n - 1 ; i++) {
            if (s[i].charAt(s[i].length() - 1) != s[i + 1].charAt(0)) flg = false;
        }
        System.out.println(flg ? "Yes" : "No");
    } main {
        @SuppressWarnings("resource")
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String[] s = new String[n];
        for (int i = 0 ; i < n ; i++) {
            s[i] = sc.next();
        }
        boolean flg = true;
        for (int i = 0 ; i < n ; i++) {
            for (int j = i + 1 ; j < n ; j++) {
                if (s[i].equals(s[j])) flg = false;
            }
        }
        for (int i = 0 ; i < n - 1 ; i++) {
            if (s[i].charAt(s[i].length() - 1) != s[i + 1].charAt(0)) flg = false;
        }
        System.out.println(flg ? "Yes" : "No");
    } @SuppressWarnings("resource")
        Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc String[] s = new String[n]; s new String[n] n for (int i = 0 ; i < n ; i++) {
            s[i] = sc.next();
        } int i = 0 ; int i = 0 ; i 0 i < n i n i++ i++ i {
            s[i] = sc.next();
        } {
            s[i] = sc.next();
        } s[i] = sc.next() s[i] s i sc.next() sc.next sc boolean flg = true; flg true for (int i = 0 ; i < n ; i++) {
            for (int j = i + 1 ; j < n ; j++) {
                if (s[i].equals(s[j])) flg = false;
            }
        } int i = 0 ; int i = 0 ; i 0 i < n i n i++ i++ i {
            for (int j = i + 1 ; j < n ; j++) {
                if (s[i].equals(s[j])) flg = false;
            }
        } {
            for (int j = i + 1 ; j < n ; j++) {
                if (s[i].equals(s[j])) flg = false;
            }
        } for (int j = i + 1 ; j < n ; j++) {
                if (s[i].equals(s[j])) flg = false;
            } int j = i + 1 ; int j = i + 1 ; j i + 1 i 1 j < n j n j++ j++ j {
                if (s[i].equals(s[j])) flg = false;
            } {
                if (s[i].equals(s[j])) flg = false;
            } if (s[i].equals(s[j])) flg = false; s[i].equals(s[j]) s[i].equals s[i] s i s[j] s j flg = false flg false for (int i = 0 ; i < n - 1 ; i++) {
            if (s[i].charAt(s[i].length() - 1) != s[i + 1].charAt(0)) flg = false;
        } int i = 0 ; int i = 0 ; i 0 i < n - 1 i n - 1 n 1 i++ i++ i {
            if (s[i].charAt(s[i].length() - 1) != s[i + 1].charAt(0)) flg = false;
        } {
            if (s[i].charAt(s[i].length() - 1) != s[i + 1].charAt(0)) flg = false;
        } if (s[i].charAt(s[i].length() - 1) != s[i + 1].charAt(0)) flg = false; s[i].charAt(s[i].length() - 1) != s[i + 1].charAt(0) s[i].charAt(s[i].length() - 1) s[i].charAt s[i] s i s[i].length() - 1 s[i].length() s[i].length s[i] s i 1 s[i + 1].charAt(0) s[i + 1].charAt s[i + 1] s i + 1 i 1 0 flg = false flg false System.out.println(flg ? "Yes" : "No") System.out.println System.out System System.out flg ? "Yes" : "No" flg "Yes" "No" String[] args args public class Main {

    public static void main(String[] args) {
        @SuppressWarnings("resource")
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String[] s = new String[n];
        for (int i = 0 ; i < n ; i++) {
            s[i] = sc.next();
        }
        boolean flg = true;
        for (int i = 0 ; i < n ; i++) {
            for (int j = i + 1 ; j < n ; j++) {
                if (s[i].equals(s[j])) flg = false;
            }
        }
        for (int i = 0 ; i < n - 1 ; i++) {
            if (s[i].charAt(s[i].length() - 1) != s[i + 1].charAt(0)) flg = false;
        }
        System.out.println(flg ? "Yes" : "No");
    }

} public class Main {

    public static void main(String[] args) {
        @SuppressWarnings("resource")
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String[] s = new String[n];
        for (int i = 0 ; i < n ; i++) {
            s[i] = sc.next();
        }
        boolean flg = true;
        for (int i = 0 ; i < n ; i++) {
            for (int j = i + 1 ; j < n ; j++) {
                if (s[i].equals(s[j])) flg = false;
            }
        }
        for (int i = 0 ; i < n - 1 ; i++) {
            if (s[i].charAt(s[i].length() - 1) != s[i + 1].charAt(0)) flg = false;
        }
        System.out.println(flg ? "Yes" : "No");
    }

} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        @SuppressWarnings("resource")
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String[] s = new String[n];
        for (int i = 0 ; i < n ; i++) {
            s[i] = sc.next();
        }
        boolean flg = true;
        for (int i = 0 ; i < n ; i++) {
            for (int j = i + 1 ; j < n ; j++) {
                if (s[i].equals(s[j])) flg = false;
            }
        }
        for (int i = 0 ; i < n - 1 ; i++) {
            if (s[i].charAt(s[i].length() - 1) != s[i + 1].charAt(0)) flg = false;
        }
        System.out.println(flg ? "Yes" : "No");
    }

}