import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        String[] arr = new String[n];
        char last = ' ';
        char first = ' ';
        boolean f = true;

        for (int i = 0; i < n; i++) {
            String str = sc.next();
            first = str.charAt(0);
            if (i != 0 && (first != last || Arrays.asList(arr).contains(str))) {
                f = false;
                break;
            }
            last = str.charAt(str.length() - 1);
            arr[i] = str;

        }
        if (f) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        String[] arr = new String[n];
        char last = ' ';
        char first = ' ';
        boolean f = true;

        for (int i = 0; i < n; i++) {
            String str = sc.next();
            first = str.charAt(0);
            if (i != 0 && (first != last || Arrays.asList(arr).contains(str))) {
                f = false;
                break;
            }
            last = str.charAt(str.length() - 1);
            arr[i] = str;

        }
        if (f) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        String[] arr = new String[n];
        char last = ' ';
        char first = ' ';
        boolean f = true;

        for (int i = 0; i < n; i++) {
            String str = sc.next();
            first = str.charAt(0);
            if (i != 0 && (first != last || Arrays.asList(arr).contains(str))) {
                f = false;
                break;
            }
            last = str.charAt(str.length() - 1);
            arr[i] = str;

        }
        if (f) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        String[] arr = new String[n];
        char last = ' ';
        char first = ' ';
        boolean f = true;

        for (int i = 0; i < n; i++) {
            String str = sc.next();
            first = str.charAt(0);
            if (i != 0 && (first != last || Arrays.asList(arr).contains(str))) {
                f = false;
                break;
            }
            last = str.charAt(str.length() - 1);
            arr[i] = str;

        }
        if (f) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    } 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[] arr = new String[n]; arr new String[n] n char last = ' '; last ' ' char first = ' '; first ' ' boolean f = true; f true for (int i = 0; i < n; i++) {
            String str = sc.next();
            first = str.charAt(0);
            if (i != 0 && (first != last || Arrays.asList(arr).contains(str))) {
                f = false;
                break;
            }
            last = str.charAt(str.length() - 1);
            arr[i] = str;

        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            String str = sc.next();
            first = str.charAt(0);
            if (i != 0 && (first != last || Arrays.asList(arr).contains(str))) {
                f = false;
                break;
            }
            last = str.charAt(str.length() - 1);
            arr[i] = str;

        } {
            String str = sc.next();
            first = str.charAt(0);
            if (i != 0 && (first != last || Arrays.asList(arr).contains(str))) {
                f = false;
                break;
            }
            last = str.charAt(str.length() - 1);
            arr[i] = str;

        } String str = sc.next(); str sc.next() sc.next sc first = str.charAt(0) first str.charAt(0) str.charAt str 0 if (i != 0 && (first != last || Arrays.asList(arr).contains(str))) {
                f = false;
                break;
            } i != 0 && (first != last || Arrays.asList(arr).contains(str)) i != 0 i 0 (first != last || Arrays.asList(arr).contains(str)) first != last first last Arrays.asList(arr).contains(str) Arrays.asList(arr).contains Arrays.asList(arr) Arrays.asList Arrays arr str {
                f = false;
                break;
            } f = false f false break; last = str.charAt(str.length() - 1) last str.charAt(str.length() - 1) str.charAt str str.length() - 1 str.length() str.length str 1 arr[i] = str arr[i] arr i str if (f) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        } f {
            System.out.println("Yes");
        } System.out.println("Yes") System.out.println System.out System System.out "Yes" {
            System.out.println("No");
        } System.out.println("No") System.out.println System.out System System.out "No" 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[] arr = new String[n];
        char last = ' ';
        char first = ' ';
        boolean f = true;

        for (int i = 0; i < n; i++) {
            String str = sc.next();
            first = str.charAt(0);
            if (i != 0 && (first != last || Arrays.asList(arr).contains(str))) {
                f = false;
                break;
            }
            last = str.charAt(str.length() - 1);
            arr[i] = str;

        }
        if (f) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        String[] arr = new String[n];
        char last = ' ';
        char first = ' ';
        boolean f = true;

        for (int i = 0; i < n; i++) {
            String str = sc.next();
            first = str.charAt(0);
            if (i != 0 && (first != last || Arrays.asList(arr).contains(str))) {
                f = false;
                break;
            }
            last = str.charAt(str.length() - 1);
            arr[i] = str;

        }
        if (f) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        String[] arr = new String[n];
        char last = ' ';
        char first = ' ';
        boolean f = true;

        for (int i = 0; i < n; i++) {
            String str = sc.next();
            first = str.charAt(0);
            if (i != 0 && (first != last || Arrays.asList(arr).contains(str))) {
                f = false;
                break;
            }
            last = str.charAt(str.length() - 1);
            arr[i] = str;

        }
        if (f) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
}