import java.util.*;
import java.lang.*;

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>(n);
        for(int i = 0; i < n; i++){
            w.add(sc.next());
        }
        List<String> x = new ArrayList<String>(new HashSet<>(w));
        boolean bre = false;
        for(int i = 0; i < n - 1; i++){
            if (w.get(i).charAt(w.get(i).length() - 1) != w.get(i + 1).charAt(0)) {
                bre = true;
                break;
            }
        }
        if (bre || w.size() != x.size()) {
            System.out.println("No");
        }else{
            System.out.println("Yes");
        }
    }
} import java.util.*; util.* java import java.lang.*; lang.* java 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>(n);
        for(int i = 0; i < n; i++){
            w.add(sc.next());
        }
        List<String> x = new ArrayList<String>(new HashSet<>(w));
        boolean bre = false;
        for(int i = 0; i < n - 1; i++){
            if (w.get(i).charAt(w.get(i).length() - 1) != w.get(i + 1).charAt(0)) {
                bre = true;
                break;
            }
        }
        if (bre || w.size() != x.size()) {
            System.out.println("No");
        }else{
            System.out.println("Yes");
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        List<String> w = new ArrayList<String>(n);
        for(int i = 0; i < n; i++){
            w.add(sc.next());
        }
        List<String> x = new ArrayList<String>(new HashSet<>(w));
        boolean bre = false;
        for(int i = 0; i < n - 1; i++){
            if (w.get(i).charAt(w.get(i).length() - 1) != w.get(i + 1).charAt(0)) {
                bre = true;
                break;
            }
        }
        if (bre || w.size() != x.size()) {
            System.out.println("No");
        }else{
            System.out.println("Yes");
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        List<String> w = new ArrayList<String>(n);
        for(int i = 0; i < n; i++){
            w.add(sc.next());
        }
        List<String> x = new ArrayList<String>(new HashSet<>(w));
        boolean bre = false;
        for(int i = 0; i < n - 1; i++){
            if (w.get(i).charAt(w.get(i).length() - 1) != w.get(i + 1).charAt(0)) {
                bre = true;
                break;
            }
        }
        if (bre || w.size() != x.size()) {
            System.out.println("No");
        }else{
            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 List<String> w = new ArrayList<String>(n); w new ArrayList<String>(n) for(int i = 0; i < n; i++){
            w.add(sc.next());
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            w.add(sc.next());
        } {
            w.add(sc.next());
        } w.add(sc.next()) w.add w sc.next() sc.next sc List<String> x = new ArrayList<String>(new HashSet<>(w)); x new ArrayList<String>(new HashSet<>(w)) boolean bre = false; bre false for(int i = 0; i < n - 1; i++){
            if (w.get(i).charAt(w.get(i).length() - 1) != w.get(i + 1).charAt(0)) {
                bre = true;
                break;
            }
        } int i = 0; int i = 0; i 0 i < n - 1 i n - 1 n 1 i++ i++ i {
            if (w.get(i).charAt(w.get(i).length() - 1) != w.get(i + 1).charAt(0)) {
                bre = true;
                break;
            }
        } {
            if (w.get(i).charAt(w.get(i).length() - 1) != w.get(i + 1).charAt(0)) {
                bre = true;
                break;
            }
        } if (w.get(i).charAt(w.get(i).length() - 1) != w.get(i + 1).charAt(0)) {
                bre = true;
                break;
            } w.get(i).charAt(w.get(i).length() - 1) != w.get(i + 1).charAt(0) w.get(i).charAt(w.get(i).length() - 1) w.get(i).charAt w.get(i) w.get w i w.get(i).length() - 1 w.get(i).length() w.get(i).length w.get(i) w.get w i 1 w.get(i + 1).charAt(0) w.get(i + 1).charAt w.get(i + 1) w.get w i + 1 i 1 0 {
                bre = true;
                break;
            } bre = true bre true break; if (bre || w.size() != x.size()) {
            System.out.println("No");
        }else{
            System.out.println("Yes");
        } bre || w.size() != x.size() bre w.size() != x.size() w.size() w.size w x.size() x.size x {
            System.out.println("No");
        } System.out.println("No") System.out.println System.out System System.out "No" {
            System.out.println("Yes");
        } 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();
        List<String> w = new ArrayList<String>(n);
        for(int i = 0; i < n; i++){
            w.add(sc.next());
        }
        List<String> x = new ArrayList<String>(new HashSet<>(w));
        boolean bre = false;
        for(int i = 0; i < n - 1; i++){
            if (w.get(i).charAt(w.get(i).length() - 1) != w.get(i + 1).charAt(0)) {
                bre = true;
                break;
            }
        }
        if (bre || w.size() != x.size()) {
            System.out.println("No");
        }else{
            System.out.println("Yes");
        }
    }
} 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>(n);
        for(int i = 0; i < n; i++){
            w.add(sc.next());
        }
        List<String> x = new ArrayList<String>(new HashSet<>(w));
        boolean bre = false;
        for(int i = 0; i < n - 1; i++){
            if (w.get(i).charAt(w.get(i).length() - 1) != w.get(i + 1).charAt(0)) {
                bre = true;
                break;
            }
        }
        if (bre || w.size() != x.size()) {
            System.out.println("No");
        }else{
            System.out.println("Yes");
        }
    }
} Main
import java.util.*;
import java.lang.*;

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>(n);
        for(int i = 0; i < n; i++){
            w.add(sc.next());
        }
        List<String> x = new ArrayList<String>(new HashSet<>(w));
        boolean bre = false;
        for(int i = 0; i < n - 1; i++){
            if (w.get(i).charAt(w.get(i).length() - 1) != w.get(i + 1).charAt(0)) {
                bre = true;
                break;
            }
        }
        if (bre || w.size() != x.size()) {
            System.out.println("No");
        }else{
            System.out.println("Yes");
        }
    }
}