import java.util.*;
import java.util.Arrays;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
      	String ans = "Yes";
		String[] w = new String[n];
		for(int i=0; i<w.length; ++i){
			w[i] = scn.next();
		}
      	String[] ww = new String[n];
      	for(int i=0; i<w.length; ++i){
			ww[i] = w[i];
		}
      	Arrays.sort(ww);
      	for(int i=1; i<w.length; ++i){
			if(ww[i].equals(ww[i-1])){
              ans = "No";
            }
		}
      	for(int i=1; i<w.length; ++i){
          char[] last = w[i-1].toCharArray();
          char[] first = w[i].toCharArray();
          if(last[last.length-1] != first[0]){
            ans = "No";
          }
        }
      	System.out.println(ans);
	}
} import java.util.*; util.* java import java.util.Arrays; Arrays java.util public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
      	String ans = "Yes";
		String[] w = new String[n];
		for(int i=0; i<w.length; ++i){
			w[i] = scn.next();
		}
      	String[] ww = new String[n];
      	for(int i=0; i<w.length; ++i){
			ww[i] = w[i];
		}
      	Arrays.sort(ww);
      	for(int i=1; i<w.length; ++i){
			if(ww[i].equals(ww[i-1])){
              ans = "No";
            }
		}
      	for(int i=1; i<w.length; ++i){
          char[] last = w[i-1].toCharArray();
          char[] first = w[i].toCharArray();
          if(last[last.length-1] != first[0]){
            ans = "No";
          }
        }
      	System.out.println(ans);
	}
} Main public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
      	String ans = "Yes";
		String[] w = new String[n];
		for(int i=0; i<w.length; ++i){
			w[i] = scn.next();
		}
      	String[] ww = new String[n];
      	for(int i=0; i<w.length; ++i){
			ww[i] = w[i];
		}
      	Arrays.sort(ww);
      	for(int i=1; i<w.length; ++i){
			if(ww[i].equals(ww[i-1])){
              ans = "No";
            }
		}
      	for(int i=1; i<w.length; ++i){
          char[] last = w[i-1].toCharArray();
          char[] first = w[i].toCharArray();
          if(last[last.length-1] != first[0]){
            ans = "No";
          }
        }
      	System.out.println(ans);
	} main {
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
      	String ans = "Yes";
		String[] w = new String[n];
		for(int i=0; i<w.length; ++i){
			w[i] = scn.next();
		}
      	String[] ww = new String[n];
      	for(int i=0; i<w.length; ++i){
			ww[i] = w[i];
		}
      	Arrays.sort(ww);
      	for(int i=1; i<w.length; ++i){
			if(ww[i].equals(ww[i-1])){
              ans = "No";
            }
		}
      	for(int i=1; i<w.length; ++i){
          char[] last = w[i-1].toCharArray();
          char[] first = w[i].toCharArray();
          if(last[last.length-1] != first[0]){
            ans = "No";
          }
        }
      	System.out.println(ans);
	} Scanner scn = new Scanner(System.in); scn new Scanner(System.in) int n = scn.nextInt(); n scn.nextInt() scn.nextInt scn String ans = "Yes"; ans "Yes" String[] w = new String[n]; w new String[n] n for(int i=0; i<w.length; ++i){
			w[i] = scn.next();
		} int i=0; int i=0; i 0 i<w.length i w.length w w.length ++i ++i i {
			w[i] = scn.next();
		} {
			w[i] = scn.next();
		} w[i] = scn.next() w[i] w i scn.next() scn.next scn String[] ww = new String[n]; ww new String[n] n for(int i=0; i<w.length; ++i){
			ww[i] = w[i];
		} int i=0; int i=0; i 0 i<w.length i w.length w w.length ++i ++i i {
			ww[i] = w[i];
		} {
			ww[i] = w[i];
		} ww[i] = w[i] ww[i] ww i w[i] w i Arrays.sort(ww) Arrays.sort Arrays ww for(int i=1; i<w.length; ++i){
			if(ww[i].equals(ww[i-1])){
              ans = "No";
            }
		} int i=1; int i=1; i 1 i<w.length i w.length w w.length ++i ++i i {
			if(ww[i].equals(ww[i-1])){
              ans = "No";
            }
		} {
			if(ww[i].equals(ww[i-1])){
              ans = "No";
            }
		} if(ww[i].equals(ww[i-1])){
              ans = "No";
            } ww[i].equals(ww[i-1]) ww[i].equals ww[i] ww i ww[i-1] ww i-1 i 1 {
              ans = "No";
            } ans = "No" ans "No" for(int i=1; i<w.length; ++i){
          char[] last = w[i-1].toCharArray();
          char[] first = w[i].toCharArray();
          if(last[last.length-1] != first[0]){
            ans = "No";
          }
        } int i=1; int i=1; i 1 i<w.length i w.length w w.length ++i ++i i {
          char[] last = w[i-1].toCharArray();
          char[] first = w[i].toCharArray();
          if(last[last.length-1] != first[0]){
            ans = "No";
          }
        } {
          char[] last = w[i-1].toCharArray();
          char[] first = w[i].toCharArray();
          if(last[last.length-1] != first[0]){
            ans = "No";
          }
        } char[] last = w[i-1].toCharArray(); last w[i-1].toCharArray() w[i-1].toCharArray w[i-1] w i-1 i 1 char[] first = w[i].toCharArray(); first w[i].toCharArray() w[i].toCharArray w[i] w i if(last[last.length-1] != first[0]){
            ans = "No";
          } last[last.length-1] != first[0] last[last.length-1] last last.length-1 last.length last last.length 1 first[0] first 0 {
            ans = "No";
          } ans = "No" ans "No" System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
      	String ans = "Yes";
		String[] w = new String[n];
		for(int i=0; i<w.length; ++i){
			w[i] = scn.next();
		}
      	String[] ww = new String[n];
      	for(int i=0; i<w.length; ++i){
			ww[i] = w[i];
		}
      	Arrays.sort(ww);
      	for(int i=1; i<w.length; ++i){
			if(ww[i].equals(ww[i-1])){
              ans = "No";
            }
		}
      	for(int i=1; i<w.length; ++i){
          char[] last = w[i-1].toCharArray();
          char[] first = w[i].toCharArray();
          if(last[last.length-1] != first[0]){
            ans = "No";
          }
        }
      	System.out.println(ans);
	}
} public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
      	String ans = "Yes";
		String[] w = new String[n];
		for(int i=0; i<w.length; ++i){
			w[i] = scn.next();
		}
      	String[] ww = new String[n];
      	for(int i=0; i<w.length; ++i){
			ww[i] = w[i];
		}
      	Arrays.sort(ww);
      	for(int i=1; i<w.length; ++i){
			if(ww[i].equals(ww[i-1])){
              ans = "No";
            }
		}
      	for(int i=1; i<w.length; ++i){
          char[] last = w[i-1].toCharArray();
          char[] first = w[i].toCharArray();
          if(last[last.length-1] != first[0]){
            ans = "No";
          }
        }
      	System.out.println(ans);
	}
} Main
import java.util.*;
import java.util.Arrays;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
      	String ans = "Yes";
		String[] w = new String[n];
		for(int i=0; i<w.length; ++i){
			w[i] = scn.next();
		}
      	String[] ww = new String[n];
      	for(int i=0; i<w.length; ++i){
			ww[i] = w[i];
		}
      	Arrays.sort(ww);
      	for(int i=1; i<w.length; ++i){
			if(ww[i].equals(ww[i-1])){
              ans = "No";
            }
		}
      	for(int i=1; i<w.length; ++i){
          char[] last = w[i-1].toCharArray();
          char[] first = w[i].toCharArray();
          if(last[last.length-1] != first[0]){
            ans = "No";
          }
        }
      	System.out.println(ans);
	}
}
