import java.util.*;
class Main
{
    public static void main(String[] args)
    {
        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();
        }

        String ans = "Yes";
        for(int i = 0; i < N-1; i++){
            if(s[i].charAt(s[i].length() - 1) != s[i+1].charAt(0)){
                ans = "No";
 //               System.out.println(s[i]);
                break;
            }
        }
        for(int i = 0; i < N - 1; i++)
        {
            for(int j = i+1; j < N; j++){
                boolean bl = true;
                int k = 0;
                if(s[i].length() == s[j].length()){
                    while(bl == true && k < s[i].length()) {
                        if(s[i].charAt(k) != s[j].charAt(k)){
 //                           System.out.println(s[i] + " " + s[j]);
                          bl = false;
                        }
                        k++;
                    }
                    if(bl == true){
                        ans = "No";
                        break;
                    }
                }
 //               System.out.println(bl);
            }
        }
        System.out.println(ans);
    }
} import java.util.*; util.* java class Main
{
    public static void main(String[] args)
    {
        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();
        }

        String ans = "Yes";
        for(int i = 0; i < N-1; i++){
            if(s[i].charAt(s[i].length() - 1) != s[i+1].charAt(0)){
                ans = "No";
 //               System.out.println(s[i]);
                break;
            }
        }
        for(int i = 0; i < N - 1; i++)
        {
            for(int j = i+1; j < N; j++){
                boolean bl = true;
                int k = 0;
                if(s[i].length() == s[j].length()){
                    while(bl == true && k < s[i].length()) {
                        if(s[i].charAt(k) != s[j].charAt(k)){
 //                           System.out.println(s[i] + " " + s[j]);
                          bl = false;
                        }
                        k++;
                    }
                    if(bl == true){
                        ans = "No";
                        break;
                    }
                }
 //               System.out.println(bl);
            }
        }
        System.out.println(ans);
    }
} Main public static void main(String[] args)
    {
        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();
        }

        String ans = "Yes";
        for(int i = 0; i < N-1; i++){
            if(s[i].charAt(s[i].length() - 1) != s[i+1].charAt(0)){
                ans = "No";
 //               System.out.println(s[i]);
                break;
            }
        }
        for(int i = 0; i < N - 1; i++)
        {
            for(int j = i+1; j < N; j++){
                boolean bl = true;
                int k = 0;
                if(s[i].length() == s[j].length()){
                    while(bl == true && k < s[i].length()) {
                        if(s[i].charAt(k) != s[j].charAt(k)){
 //                           System.out.println(s[i] + " " + s[j]);
                          bl = false;
                        }
                        k++;
                    }
                    if(bl == true){
                        ans = "No";
                        break;
                    }
                }
 //               System.out.println(bl);
            }
        }
        System.out.println(ans);
    } main {
        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();
        }

        String ans = "Yes";
        for(int i = 0; i < N-1; i++){
            if(s[i].charAt(s[i].length() - 1) != s[i+1].charAt(0)){
                ans = "No";
 //               System.out.println(s[i]);
                break;
            }
        }
        for(int i = 0; i < N - 1; i++)
        {
            for(int j = i+1; j < N; j++){
                boolean bl = true;
                int k = 0;
                if(s[i].length() == s[j].length()){
                    while(bl == true && k < s[i].length()) {
                        if(s[i].charAt(k) != s[j].charAt(k)){
 //                           System.out.println(s[i] + " " + s[j]);
                          bl = false;
                        }
                        k++;
                    }
                    if(bl == true){
                        ans = "No";
                        break;
                    }
                }
 //               System.out.println(bl);
            }
        }
        System.out.println(ans);
    } 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 String ans = "Yes"; ans "Yes" for(int i = 0; i < N-1; i++){
            if(s[i].charAt(s[i].length() - 1) != s[i+1].charAt(0)){
                ans = "No";
 //               System.out.println(s[i]);
                break;
            }
        } 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)){
                ans = "No";
 //               System.out.println(s[i]);
                break;
            }
        } {
            if(s[i].charAt(s[i].length() - 1) != s[i+1].charAt(0)){
                ans = "No";
 //               System.out.println(s[i]);
                break;
            }
        } if(s[i].charAt(s[i].length() - 1) != s[i+1].charAt(0)){
                ans = "No";
 //               System.out.println(s[i]);
                break;
            } 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 {
                ans = "No";
 //               System.out.println(s[i]);
                break;
            } ans = "No" ans "No" break; for(int i = 0; i < N - 1; i++)
        {
            for(int j = i+1; j < N; j++){
                boolean bl = true;
                int k = 0;
                if(s[i].length() == s[j].length()){
                    while(bl == true && k < s[i].length()) {
                        if(s[i].charAt(k) != s[j].charAt(k)){
 //                           System.out.println(s[i] + " " + s[j]);
                          bl = false;
                        }
                        k++;
                    }
                    if(bl == true){
                        ans = "No";
                        break;
                    }
                }
 //               System.out.println(bl);
            }
        } int i = 0; int i = 0; i 0 i < N - 1 i N - 1 N 1 i++ i++ i {
            for(int j = i+1; j < N; j++){
                boolean bl = true;
                int k = 0;
                if(s[i].length() == s[j].length()){
                    while(bl == true && k < s[i].length()) {
                        if(s[i].charAt(k) != s[j].charAt(k)){
 //                           System.out.println(s[i] + " " + s[j]);
                          bl = false;
                        }
                        k++;
                    }
                    if(bl == true){
                        ans = "No";
                        break;
                    }
                }
 //               System.out.println(bl);
            }
        } {
            for(int j = i+1; j < N; j++){
                boolean bl = true;
                int k = 0;
                if(s[i].length() == s[j].length()){
                    while(bl == true && k < s[i].length()) {
                        if(s[i].charAt(k) != s[j].charAt(k)){
 //                           System.out.println(s[i] + " " + s[j]);
                          bl = false;
                        }
                        k++;
                    }
                    if(bl == true){
                        ans = "No";
                        break;
                    }
                }
 //               System.out.println(bl);
            }
        } for(int j = i+1; j < N; j++){
                boolean bl = true;
                int k = 0;
                if(s[i].length() == s[j].length()){
                    while(bl == true && k < s[i].length()) {
                        if(s[i].charAt(k) != s[j].charAt(k)){
 //                           System.out.println(s[i] + " " + s[j]);
                          bl = false;
                        }
                        k++;
                    }
                    if(bl == true){
                        ans = "No";
                        break;
                    }
                }
 //               System.out.println(bl);
            } int j = i+1; int j = i+1; j i+1 i 1 j < N j N j++ j++ j {
                boolean bl = true;
                int k = 0;
                if(s[i].length() == s[j].length()){
                    while(bl == true && k < s[i].length()) {
                        if(s[i].charAt(k) != s[j].charAt(k)){
 //                           System.out.println(s[i] + " " + s[j]);
                          bl = false;
                        }
                        k++;
                    }
                    if(bl == true){
                        ans = "No";
                        break;
                    }
                }
 //               System.out.println(bl);
            } {
                boolean bl = true;
                int k = 0;
                if(s[i].length() == s[j].length()){
                    while(bl == true && k < s[i].length()) {
                        if(s[i].charAt(k) != s[j].charAt(k)){
 //                           System.out.println(s[i] + " " + s[j]);
                          bl = false;
                        }
                        k++;
                    }
                    if(bl == true){
                        ans = "No";
                        break;
                    }
                }
 //               System.out.println(bl);
            } boolean bl = true; bl true int k = 0; k 0 if(s[i].length() == s[j].length()){
                    while(bl == true && k < s[i].length()) {
                        if(s[i].charAt(k) != s[j].charAt(k)){
 //                           System.out.println(s[i] + " " + s[j]);
                          bl = false;
                        }
                        k++;
                    }
                    if(bl == true){
                        ans = "No";
                        break;
                    }
                } s[i].length() == s[j].length() s[i].length() s[i].length s[i] s i s[j].length() s[j].length s[j] s j {
                    while(bl == true && k < s[i].length()) {
                        if(s[i].charAt(k) != s[j].charAt(k)){
 //                           System.out.println(s[i] + " " + s[j]);
                          bl = false;
                        }
                        k++;
                    }
                    if(bl == true){
                        ans = "No";
                        break;
                    }
                } while(bl == true && k < s[i].length()) {
                        if(s[i].charAt(k) != s[j].charAt(k)){
 //                           System.out.println(s[i] + " " + s[j]);
                          bl = false;
                        }
                        k++;
                    } bl == true && k < s[i].length() bl == true bl true k < s[i].length() k s[i].length() s[i].length s[i] s i {
                        if(s[i].charAt(k) != s[j].charAt(k)){
 //                           System.out.println(s[i] + " " + s[j]);
                          bl = false;
                        }
                        k++;
                    } if(s[i].charAt(k) != s[j].charAt(k)){
 //                           System.out.println(s[i] + " " + s[j]);
                          bl = false;
                        } s[i].charAt(k) != s[j].charAt(k) s[i].charAt(k) s[i].charAt s[i] s i k s[j].charAt(k) s[j].charAt s[j] s j k {
 //                           System.out.println(s[i] + " " + s[j]);
                          bl = false;
                        } bl = false bl false k++ k if(bl == true){
                        ans = "No";
                        break;
                    } bl == true bl true {
                        ans = "No";
                        break;
                    } ans = "No" ans "No" break; System.out.println(ans) System.out.println System.out System System.out ans String[] args args
import java.util.*;
class Main
{
    public static void main(String[] args)
    {
        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();
        }

        String ans = "Yes";
        for(int i = 0; i < N-1; i++){
            if(s[i].charAt(s[i].length() - 1) != s[i+1].charAt(0)){
                ans = "No";
 //               System.out.println(s[i]);
                break;
            }
        }
        for(int i = 0; i < N - 1; i++)
        {
            for(int j = i+1; j < N; j++){
                boolean bl = true;
                int k = 0;
                if(s[i].length() == s[j].length()){
                    while(bl == true && k < s[i].length()) {
                        if(s[i].charAt(k) != s[j].charAt(k)){
 //                           System.out.println(s[i] + " " + s[j]);
                          bl = false;
                        }
                        k++;
                    }
                    if(bl == true){
                        ans = "No";
                        break;
                    }
                }
 //               System.out.println(bl);
            }
        }
        System.out.println(ans);
    }
}