import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String[] s = new String[n];
    Set<String> set = new HashSet<String>();
    for(int i = 0;i<n;i++){
      s[i] = sc.next();
      set.add(s[i]);
    }
    if(set.size() != n){
      System.out.println("No");
      return;
    }
    for(int i = 0;i<n-1;i++){
      if(!(s[i].substring(s[i].length()-1,s[i].length()).equals(s[i+1].substring(0,1)))){
        System.out.println("No");
        return;
      }
    }
    System.out.println("Yes");
  }
} import java.util.*; util.* java public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String[] s = new String[n];
    Set<String> set = new HashSet<String>();
    for(int i = 0;i<n;i++){
      s[i] = sc.next();
      set.add(s[i]);
    }
    if(set.size() != n){
      System.out.println("No");
      return;
    }
    for(int i = 0;i<n-1;i++){
      if(!(s[i].substring(s[i].length()-1,s[i].length()).equals(s[i+1].substring(0,1)))){
        System.out.println("No");
        return;
      }
    }
    System.out.println("Yes");
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String[] s = new String[n];
    Set<String> set = new HashSet<String>();
    for(int i = 0;i<n;i++){
      s[i] = sc.next();
      set.add(s[i]);
    }
    if(set.size() != n){
      System.out.println("No");
      return;
    }
    for(int i = 0;i<n-1;i++){
      if(!(s[i].substring(s[i].length()-1,s[i].length()).equals(s[i+1].substring(0,1)))){
        System.out.println("No");
        return;
      }
    }
    System.out.println("Yes");
  } main {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String[] s = new String[n];
    Set<String> set = new HashSet<String>();
    for(int i = 0;i<n;i++){
      s[i] = sc.next();
      set.add(s[i]);
    }
    if(set.size() != n){
      System.out.println("No");
      return;
    }
    for(int i = 0;i<n-1;i++){
      if(!(s[i].substring(s[i].length()-1,s[i].length()).equals(s[i+1].substring(0,1)))){
        System.out.println("No");
        return;
      }
    }
    System.out.println("Yes");
  } 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 Set<String> set = new HashSet<String>(); set new HashSet<String>() for(int i = 0;i<n;i++){
      s[i] = sc.next();
      set.add(s[i]);
    } int i = 0; int i = 0; i 0 i<n i n i++ i++ i {
      s[i] = sc.next();
      set.add(s[i]);
    } {
      s[i] = sc.next();
      set.add(s[i]);
    } s[i] = sc.next() s[i] s i sc.next() sc.next sc set.add(s[i]) set.add set s[i] s i if(set.size() != n){
      System.out.println("No");
      return;
    } set.size() != n set.size() set.size set n {
      System.out.println("No");
      return;
    } System.out.println("No") System.out.println System.out System System.out "No" return; for(int i = 0;i<n-1;i++){
      if(!(s[i].substring(s[i].length()-1,s[i].length()).equals(s[i+1].substring(0,1)))){
        System.out.println("No");
        return;
      }
    } int i = 0; int i = 0; i 0 i<n-1 i n-1 n 1 i++ i++ i {
      if(!(s[i].substring(s[i].length()-1,s[i].length()).equals(s[i+1].substring(0,1)))){
        System.out.println("No");
        return;
      }
    } {
      if(!(s[i].substring(s[i].length()-1,s[i].length()).equals(s[i+1].substring(0,1)))){
        System.out.println("No");
        return;
      }
    } if(!(s[i].substring(s[i].length()-1,s[i].length()).equals(s[i+1].substring(0,1)))){
        System.out.println("No");
        return;
      } !(s[i].substring(s[i].length()-1,s[i].length()).equals(s[i+1].substring(0,1))) (s[i].substring(s[i].length()-1,s[i].length()).equals(s[i+1].substring(0,1))) s[i].substring(s[i].length()-1,s[i].length()).equals s[i].substring(s[i].length()-1,s[i].length()) s[i].substring s[i] s i s[i].length()-1 s[i].length() s[i].length s[i] s i 1 s[i].length() s[i].length s[i] s i s[i+1].substring(0,1) s[i+1].substring s[i+1] s i+1 i 1 0 1 {
        System.out.println("No");
        return;
      } System.out.println("No") System.out.println System.out System System.out "No" return; System.out.println("Yes") System.out.println System.out System System.out "Yes" String[] args args public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String[] s = new String[n];
    Set<String> set = new HashSet<String>();
    for(int i = 0;i<n;i++){
      s[i] = sc.next();
      set.add(s[i]);
    }
    if(set.size() != n){
      System.out.println("No");
      return;
    }
    for(int i = 0;i<n-1;i++){
      if(!(s[i].substring(s[i].length()-1,s[i].length()).equals(s[i+1].substring(0,1)))){
        System.out.println("No");
        return;
      }
    }
    System.out.println("Yes");
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String[] s = new String[n];
    Set<String> set = new HashSet<String>();
    for(int i = 0;i<n;i++){
      s[i] = sc.next();
      set.add(s[i]);
    }
    if(set.size() != n){
      System.out.println("No");
      return;
    }
    for(int i = 0;i<n-1;i++){
      if(!(s[i].substring(s[i].length()-1,s[i].length()).equals(s[i+1].substring(0,1)))){
        System.out.println("No");
        return;
      }
    }
    System.out.println("Yes");
  }
} Main
import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String[] s = new String[n];
    Set<String> set = new HashSet<String>();
    for(int i = 0;i<n;i++){
      s[i] = sc.next();
      set.add(s[i]);
    }
    if(set.size() != n){
      System.out.println("No");
      return;
    }
    for(int i = 0;i<n-1;i++){
      if(!(s[i].substring(s[i].length()-1,s[i].length()).equals(s[i+1].substring(0,1)))){
        System.out.println("No");
        return;
      }
    }
    System.out.println("Yes");
  }
}
