import java.util.*;
class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        boolean ans = true;
        String[] s = new String[n];
        s[0] = sc.next();
        for(int i =1;i<n;i++){
            String tmp = sc.next();
            if(Arrays.asList(s).contains(tmp)){
                ans = false;
                break;
            }
            s[i] = tmp;
            if(s[i].charAt(0)!=s[i-1].charAt(s[i-1].length()-1)){
                ans = false;
                break;
            }
        }
        if(ans){
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} import java.util.*; util.* java class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        boolean ans = true;
        String[] s = new String[n];
        s[0] = sc.next();
        for(int i =1;i<n;i++){
            String tmp = sc.next();
            if(Arrays.asList(s).contains(tmp)){
                ans = false;
                break;
            }
            s[i] = tmp;
            if(s[i].charAt(0)!=s[i-1].charAt(s[i-1].length()-1)){
                ans = false;
                break;
            }
        }
        if(ans){
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        boolean ans = true;
        String[] s = new String[n];
        s[0] = sc.next();
        for(int i =1;i<n;i++){
            String tmp = sc.next();
            if(Arrays.asList(s).contains(tmp)){
                ans = false;
                break;
            }
            s[i] = tmp;
            if(s[i].charAt(0)!=s[i-1].charAt(s[i-1].length()-1)){
                ans = false;
                break;
            }
        }
        if(ans){
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        boolean ans = true;
        String[] s = new String[n];
        s[0] = sc.next();
        for(int i =1;i<n;i++){
            String tmp = sc.next();
            if(Arrays.asList(s).contains(tmp)){
                ans = false;
                break;
            }
            s[i] = tmp;
            if(s[i].charAt(0)!=s[i-1].charAt(s[i-1].length()-1)){
                ans = false;
                break;
            }
        }
        if(ans){
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc boolean ans = true; ans true String[] s = new String[n]; s new String[n] n s[0] = sc.next() s[0] s 0 sc.next() sc.next sc for(int i =1;i<n;i++){
            String tmp = sc.next();
            if(Arrays.asList(s).contains(tmp)){
                ans = false;
                break;
            }
            s[i] = tmp;
            if(s[i].charAt(0)!=s[i-1].charAt(s[i-1].length()-1)){
                ans = false;
                break;
            }
        } int i =1; int i =1; i 1 i<n i n i++ i++ i {
            String tmp = sc.next();
            if(Arrays.asList(s).contains(tmp)){
                ans = false;
                break;
            }
            s[i] = tmp;
            if(s[i].charAt(0)!=s[i-1].charAt(s[i-1].length()-1)){
                ans = false;
                break;
            }
        } {
            String tmp = sc.next();
            if(Arrays.asList(s).contains(tmp)){
                ans = false;
                break;
            }
            s[i] = tmp;
            if(s[i].charAt(0)!=s[i-1].charAt(s[i-1].length()-1)){
                ans = false;
                break;
            }
        } String tmp = sc.next(); tmp sc.next() sc.next sc if(Arrays.asList(s).contains(tmp)){
                ans = false;
                break;
            } Arrays.asList(s).contains(tmp) Arrays.asList(s).contains Arrays.asList(s) Arrays.asList Arrays s tmp {
                ans = false;
                break;
            } ans = false ans false break; s[i] = tmp s[i] s i tmp if(s[i].charAt(0)!=s[i-1].charAt(s[i-1].length()-1)){
                ans = false;
                break;
            } s[i].charAt(0)!=s[i-1].charAt(s[i-1].length()-1) s[i].charAt(0) s[i].charAt s[i] s i 0 s[i-1].charAt(s[i-1].length()-1) s[i-1].charAt s[i-1] s i-1 i 1 s[i-1].length()-1 s[i-1].length() s[i-1].length s[i-1] s i-1 i 1 1 {
                ans = false;
                break;
            } ans = false ans false break; if(ans){
            System.out.println("Yes");
        } else {
            System.out.println("No");
        } ans {
            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
import java.util.*;
class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        boolean ans = true;
        String[] s = new String[n];
        s[0] = sc.next();
        for(int i =1;i<n;i++){
            String tmp = sc.next();
            if(Arrays.asList(s).contains(tmp)){
                ans = false;
                break;
            }
            s[i] = tmp;
            if(s[i].charAt(0)!=s[i-1].charAt(s[i-1].length()-1)){
                ans = false;
                break;
            }
        }
        if(ans){
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
}