import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    Map<String,String> m = new HashMap<String,String>();
    String preString = sc.next();
    char lastChar = preString.charAt(preString.length() - 1);
    m.put(preString,preString);

    for(int i=1;i<N;i++){
      String string = sc.next();
      if(string.charAt(0) != lastChar || m.containsKey(string)){
        System.out.println("No");
        return;
      }
      lastChar = string.charAt(string.length() - 1);
      m.put(string,string);
    }
    System.out.println("Yes");
    return;
  }
} import java.util.*; util.* java public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    Map<String,String> m = new HashMap<String,String>();
    String preString = sc.next();
    char lastChar = preString.charAt(preString.length() - 1);
    m.put(preString,preString);

    for(int i=1;i<N;i++){
      String string = sc.next();
      if(string.charAt(0) != lastChar || m.containsKey(string)){
        System.out.println("No");
        return;
      }
      lastChar = string.charAt(string.length() - 1);
      m.put(string,string);
    }
    System.out.println("Yes");
    return;
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    Map<String,String> m = new HashMap<String,String>();
    String preString = sc.next();
    char lastChar = preString.charAt(preString.length() - 1);
    m.put(preString,preString);

    for(int i=1;i<N;i++){
      String string = sc.next();
      if(string.charAt(0) != lastChar || m.containsKey(string)){
        System.out.println("No");
        return;
      }
      lastChar = string.charAt(string.length() - 1);
      m.put(string,string);
    }
    System.out.println("Yes");
    return;
  } main {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    Map<String,String> m = new HashMap<String,String>();
    String preString = sc.next();
    char lastChar = preString.charAt(preString.length() - 1);
    m.put(preString,preString);

    for(int i=1;i<N;i++){
      String string = sc.next();
      if(string.charAt(0) != lastChar || m.containsKey(string)){
        System.out.println("No");
        return;
      }
      lastChar = string.charAt(string.length() - 1);
      m.put(string,string);
    }
    System.out.println("Yes");
    return;
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc Map<String,String> m = new HashMap<String,String>(); m new HashMap<String,String>() String preString = sc.next(); preString sc.next() sc.next sc char lastChar = preString.charAt(preString.length() - 1); lastChar preString.charAt(preString.length() - 1) preString.charAt preString preString.length() - 1 preString.length() preString.length preString 1 m.put(preString,preString) m.put m preString preString for(int i=1;i<N;i++){
      String string = sc.next();
      if(string.charAt(0) != lastChar || m.containsKey(string)){
        System.out.println("No");
        return;
      }
      lastChar = string.charAt(string.length() - 1);
      m.put(string,string);
    } int i=1; int i=1; i 1 i<N i N i++ i++ i {
      String string = sc.next();
      if(string.charAt(0) != lastChar || m.containsKey(string)){
        System.out.println("No");
        return;
      }
      lastChar = string.charAt(string.length() - 1);
      m.put(string,string);
    } {
      String string = sc.next();
      if(string.charAt(0) != lastChar || m.containsKey(string)){
        System.out.println("No");
        return;
      }
      lastChar = string.charAt(string.length() - 1);
      m.put(string,string);
    } String string = sc.next(); string sc.next() sc.next sc if(string.charAt(0) != lastChar || m.containsKey(string)){
        System.out.println("No");
        return;
      } string.charAt(0) != lastChar || m.containsKey(string) string.charAt(0) != lastChar string.charAt(0) string.charAt string 0 lastChar m.containsKey(string) m.containsKey m string {
        System.out.println("No");
        return;
      } System.out.println("No") System.out.println System.out System System.out "No" return; lastChar = string.charAt(string.length() - 1) lastChar string.charAt(string.length() - 1) string.charAt string string.length() - 1 string.length() string.length string 1 m.put(string,string) m.put m string string System.out.println("Yes") System.out.println System.out System System.out "Yes" return; String[] args args public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    Map<String,String> m = new HashMap<String,String>();
    String preString = sc.next();
    char lastChar = preString.charAt(preString.length() - 1);
    m.put(preString,preString);

    for(int i=1;i<N;i++){
      String string = sc.next();
      if(string.charAt(0) != lastChar || m.containsKey(string)){
        System.out.println("No");
        return;
      }
      lastChar = string.charAt(string.length() - 1);
      m.put(string,string);
    }
    System.out.println("Yes");
    return;
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    Map<String,String> m = new HashMap<String,String>();
    String preString = sc.next();
    char lastChar = preString.charAt(preString.length() - 1);
    m.put(preString,preString);

    for(int i=1;i<N;i++){
      String string = sc.next();
      if(string.charAt(0) != lastChar || m.containsKey(string)){
        System.out.println("No");
        return;
      }
      lastChar = string.charAt(string.length() - 1);
      m.put(string,string);
    }
    System.out.println("Yes");
    return;
  }
} Main
import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    Map<String,String> m = new HashMap<String,String>();
    String preString = sc.next();
    char lastChar = preString.charAt(preString.length() - 1);
    m.put(preString,preString);

    for(int i=1;i<N;i++){
      String string = sc.next();
      if(string.charAt(0) != lastChar || m.containsKey(string)){
        System.out.println("No");
        return;
      }
      lastChar = string.charAt(string.length() - 1);
      m.put(string,string);
    }
    System.out.println("Yes");
    return;
  }
}
