import java.util.*;

public class Main{
  public static void main(String[]args){
    Scanner sc = new Scanner(System.in);
    int N = Integer.parseInt(sc.nextLine());
    Set<String> set = new HashSet<>();
    String S = sc.nextLine();
    set.add(S);
    
    String ans = "Yes";
    char c = S.charAt(S.length()-1);
    for(int i = 1; i < N; i++){
      String s = sc.nextLine();
      int n = set.size();
      set.add(s);
      if(c != s.charAt(0) || n == set.size()){
        ans = "No";
      }
      c = s.charAt(s.length()-1);
    }
    System.out.println(ans);
  }
} import java.util.*; util.* java public class Main{
  public static void main(String[]args){
    Scanner sc = new Scanner(System.in);
    int N = Integer.parseInt(sc.nextLine());
    Set<String> set = new HashSet<>();
    String S = sc.nextLine();
    set.add(S);
    
    String ans = "Yes";
    char c = S.charAt(S.length()-1);
    for(int i = 1; i < N; i++){
      String s = sc.nextLine();
      int n = set.size();
      set.add(s);
      if(c != s.charAt(0) || n == set.size()){
        ans = "No";
      }
      c = s.charAt(s.length()-1);
    }
    System.out.println(ans);
  }
} Main public static void main(String[]args){
    Scanner sc = new Scanner(System.in);
    int N = Integer.parseInt(sc.nextLine());
    Set<String> set = new HashSet<>();
    String S = sc.nextLine();
    set.add(S);
    
    String ans = "Yes";
    char c = S.charAt(S.length()-1);
    for(int i = 1; i < N; i++){
      String s = sc.nextLine();
      int n = set.size();
      set.add(s);
      if(c != s.charAt(0) || n == set.size()){
        ans = "No";
      }
      c = s.charAt(s.length()-1);
    }
    System.out.println(ans);
  } main {
    Scanner sc = new Scanner(System.in);
    int N = Integer.parseInt(sc.nextLine());
    Set<String> set = new HashSet<>();
    String S = sc.nextLine();
    set.add(S);
    
    String ans = "Yes";
    char c = S.charAt(S.length()-1);
    for(int i = 1; i < N; i++){
      String s = sc.nextLine();
      int n = set.size();
      set.add(s);
      if(c != s.charAt(0) || n == set.size()){
        ans = "No";
      }
      c = s.charAt(s.length()-1);
    }
    System.out.println(ans);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = Integer.parseInt(sc.nextLine()); N Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc Set<String> set = new HashSet<>(); set new HashSet<>() String S = sc.nextLine(); S sc.nextLine() sc.nextLine sc set.add(S) set.add set S String ans = "Yes"; ans "Yes" char c = S.charAt(S.length()-1); c S.charAt(S.length()-1) S.charAt S S.length()-1 S.length() S.length S 1 for(int i = 1; i < N; i++){
      String s = sc.nextLine();
      int n = set.size();
      set.add(s);
      if(c != s.charAt(0) || n == set.size()){
        ans = "No";
      }
      c = s.charAt(s.length()-1);
    } int i = 1; int i = 1; i 1 i < N i N i++ i++ i {
      String s = sc.nextLine();
      int n = set.size();
      set.add(s);
      if(c != s.charAt(0) || n == set.size()){
        ans = "No";
      }
      c = s.charAt(s.length()-1);
    } {
      String s = sc.nextLine();
      int n = set.size();
      set.add(s);
      if(c != s.charAt(0) || n == set.size()){
        ans = "No";
      }
      c = s.charAt(s.length()-1);
    } String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc int n = set.size(); n set.size() set.size set set.add(s) set.add set s if(c != s.charAt(0) || n == set.size()){
        ans = "No";
      } c != s.charAt(0) || n == set.size() c != s.charAt(0) c s.charAt(0) s.charAt s 0 n == set.size() n set.size() set.size set {
        ans = "No";
      } ans = "No" ans "No" c = s.charAt(s.length()-1) c s.charAt(s.length()-1) s.charAt s s.length()-1 s.length() s.length s 1 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){
    Scanner sc = new Scanner(System.in);
    int N = Integer.parseInt(sc.nextLine());
    Set<String> set = new HashSet<>();
    String S = sc.nextLine();
    set.add(S);
    
    String ans = "Yes";
    char c = S.charAt(S.length()-1);
    for(int i = 1; i < N; i++){
      String s = sc.nextLine();
      int n = set.size();
      set.add(s);
      if(c != s.charAt(0) || n == set.size()){
        ans = "No";
      }
      c = s.charAt(s.length()-1);
    }
    System.out.println(ans);
  }
} public class Main{
  public static void main(String[]args){
    Scanner sc = new Scanner(System.in);
    int N = Integer.parseInt(sc.nextLine());
    Set<String> set = new HashSet<>();
    String S = sc.nextLine();
    set.add(S);
    
    String ans = "Yes";
    char c = S.charAt(S.length()-1);
    for(int i = 1; i < N; i++){
      String s = sc.nextLine();
      int n = set.size();
      set.add(s);
      if(c != s.charAt(0) || n == set.size()){
        ans = "No";
      }
      c = s.charAt(s.length()-1);
    }
    System.out.println(ans);
  }
} Main
import java.util.*;

public class Main{
  public static void main(String[]args){
    Scanner sc = new Scanner(System.in);
    int N = Integer.parseInt(sc.nextLine());
    Set<String> set = new HashSet<>();
    String S = sc.nextLine();
    set.add(S);
    
    String ans = "Yes";
    char c = S.charAt(S.length()-1);
    for(int i = 1; i < N; i++){
      String s = sc.nextLine();
      int n = set.size();
      set.add(s);
      if(c != s.charAt(0) || n == set.size()){
        ans = "No";
      }
      c = s.charAt(s.length()-1);
    }
    System.out.println(ans);
  }
}