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

        final int N = Integer.parseInt(sc.next());
        String[] ss = new String[N];
        for (int i = 0; i < N; i++) {
            ss[i] = sc.next();
        }
        String ans = "Yes";
        
        for (int i = 0; i < N; i++) {
            for (int j = i + 1; j < N; j++) {
                if (ss[i].equals(ss[j])) {
                    ans = "No";
                    break;
                }    
            }
        }
        for (int i = 0; i < N - 1; i++) {
            char last = ss[i].charAt(ss[i].length() - 1);
            char first = ss[i+1].charAt(0);
            if (last != first) {
                ans = "No";
                break;
            } 
        }
        
        out.println(ans);
        
        out.flush();
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        final int N = Integer.parseInt(sc.next());
        String[] ss = new String[N];
        for (int i = 0; i < N; i++) {
            ss[i] = sc.next();
        }
        String ans = "Yes";
        
        for (int i = 0; i < N; i++) {
            for (int j = i + 1; j < N; j++) {
                if (ss[i].equals(ss[j])) {
                    ans = "No";
                    break;
                }    
            }
        }
        for (int i = 0; i < N - 1; i++) {
            char last = ss[i].charAt(ss[i].length() - 1);
            char first = ss[i+1].charAt(0);
            if (last != first) {
                ans = "No";
                break;
            } 
        }
        
        out.println(ans);
        
        out.flush();
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        final int N = Integer.parseInt(sc.next());
        String[] ss = new String[N];
        for (int i = 0; i < N; i++) {
            ss[i] = sc.next();
        }
        String ans = "Yes";
        
        for (int i = 0; i < N; i++) {
            for (int j = i + 1; j < N; j++) {
                if (ss[i].equals(ss[j])) {
                    ans = "No";
                    break;
                }    
            }
        }
        for (int i = 0; i < N - 1; i++) {
            char last = ss[i].charAt(ss[i].length() - 1);
            char first = ss[i+1].charAt(0);
            if (last != first) {
                ans = "No";
                break;
            } 
        }
        
        out.println(ans);
        
        out.flush();
    } main {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        final int N = Integer.parseInt(sc.next());
        String[] ss = new String[N];
        for (int i = 0; i < N; i++) {
            ss[i] = sc.next();
        }
        String ans = "Yes";
        
        for (int i = 0; i < N; i++) {
            for (int j = i + 1; j < N; j++) {
                if (ss[i].equals(ss[j])) {
                    ans = "No";
                    break;
                }    
            }
        }
        for (int i = 0; i < N - 1; i++) {
            char last = ss[i].charAt(ss[i].length() - 1);
            char first = ss[i+1].charAt(0);
            if (last != first) {
                ans = "No";
                break;
            } 
        }
        
        out.println(ans);
        
        out.flush();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) final int N = Integer.parseInt(sc.next()); N Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc String[] ss = new String[N]; ss new String[N] N for (int i = 0; i < N; i++) {
            ss[i] = sc.next();
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            ss[i] = sc.next();
        } {
            ss[i] = sc.next();
        } ss[i] = sc.next() ss[i] ss i sc.next() sc.next sc String ans = "Yes"; ans "Yes" for (int i = 0; i < N; i++) {
            for (int j = i + 1; j < N; j++) {
                if (ss[i].equals(ss[j])) {
                    ans = "No";
                    break;
                }    
            }
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            for (int j = i + 1; j < N; j++) {
                if (ss[i].equals(ss[j])) {
                    ans = "No";
                    break;
                }    
            }
        } {
            for (int j = i + 1; j < N; j++) {
                if (ss[i].equals(ss[j])) {
                    ans = "No";
                    break;
                }    
            }
        } for (int j = i + 1; j < N; j++) {
                if (ss[i].equals(ss[j])) {
                    ans = "No";
                    break;
                }    
            } int j = i + 1; int j = i + 1; j i + 1 i 1 j < N j N j++ j++ j {
                if (ss[i].equals(ss[j])) {
                    ans = "No";
                    break;
                }    
            } {
                if (ss[i].equals(ss[j])) {
                    ans = "No";
                    break;
                }    
            } if (ss[i].equals(ss[j])) {
                    ans = "No";
                    break;
                } ss[i].equals(ss[j]) ss[i].equals ss[i] ss i ss[j] ss j {
                    ans = "No";
                    break;
                } ans = "No" ans "No" break; for (int i = 0; i < N - 1; i++) {
            char last = ss[i].charAt(ss[i].length() - 1);
            char first = ss[i+1].charAt(0);
            if (last != first) {
                ans = "No";
                break;
            } 
        } int i = 0; int i = 0; i 0 i < N - 1 i N - 1 N 1 i++ i++ i {
            char last = ss[i].charAt(ss[i].length() - 1);
            char first = ss[i+1].charAt(0);
            if (last != first) {
                ans = "No";
                break;
            } 
        } {
            char last = ss[i].charAt(ss[i].length() - 1);
            char first = ss[i+1].charAt(0);
            if (last != first) {
                ans = "No";
                break;
            } 
        } char last = ss[i].charAt(ss[i].length() - 1); last ss[i].charAt(ss[i].length() - 1) ss[i].charAt ss[i] ss i ss[i].length() - 1 ss[i].length() ss[i].length ss[i] ss i 1 char first = ss[i+1].charAt(0); first ss[i+1].charAt(0) ss[i+1].charAt ss[i+1] ss i+1 i 1 0 if (last != first) {
                ans = "No";
                break;
            } last != first last first {
                ans = "No";
                break;
            } ans = "No" ans "No" break; out.println(ans) out.println out ans out.flush() out.flush out String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        final int N = Integer.parseInt(sc.next());
        String[] ss = new String[N];
        for (int i = 0; i < N; i++) {
            ss[i] = sc.next();
        }
        String ans = "Yes";
        
        for (int i = 0; i < N; i++) {
            for (int j = i + 1; j < N; j++) {
                if (ss[i].equals(ss[j])) {
                    ans = "No";
                    break;
                }    
            }
        }
        for (int i = 0; i < N - 1; i++) {
            char last = ss[i].charAt(ss[i].length() - 1);
            char first = ss[i+1].charAt(0);
            if (last != first) {
                ans = "No";
                break;
            } 
        }
        
        out.println(ans);
        
        out.flush();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        final int N = Integer.parseInt(sc.next());
        String[] ss = new String[N];
        for (int i = 0; i < N; i++) {
            ss[i] = sc.next();
        }
        String ans = "Yes";
        
        for (int i = 0; i < N; i++) {
            for (int j = i + 1; j < N; j++) {
                if (ss[i].equals(ss[j])) {
                    ans = "No";
                    break;
                }    
            }
        }
        for (int i = 0; i < N - 1; i++) {
            char last = ss[i].charAt(ss[i].length() - 1);
            char first = ss[i+1].charAt(0);
            if (last != first) {
                ans = "No";
                break;
            } 
        }
        
        out.println(ans);
        
        out.flush();
    }
} Main
import java.io.*;
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        final int N = Integer.parseInt(sc.next());
        String[] ss = new String[N];
        for (int i = 0; i < N; i++) {
            ss[i] = sc.next();
        }
        String ans = "Yes";
        
        for (int i = 0; i < N; i++) {
            for (int j = i + 1; j < N; j++) {
                if (ss[i].equals(ss[j])) {
                    ans = "No";
                    break;
                }    
            }
        }
        for (int i = 0; i < N - 1; i++) {
            char last = ss[i].charAt(ss[i].length() - 1);
            char first = ss[i+1].charAt(0);
            if (last != first) {
                ans = "No";
                break;
            } 
        }
        
        out.println(ans);
        
        out.flush();
    }
}