import java.util.Scanner;
import java.util.LinkedHashSet;
import java.util.Set;
public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String[] w = new String[n];
    for(int i=0;i<n;i++){
      w[i]=sc.next();
    }
     if(check1(w) && check2(w)){
       System.out.println("Yes");
     }else{
       System.out.println("No");
     }
  }    
  static boolean check1(String[] w){
      Set<String> linkedHashSet = new LinkedHashSet<String>();
      for (int i=0;i<w.length;i++) {
       linkedHashSet.add(w[i]);
      }
      Object[] w_after = linkedHashSet.toArray();
      if(w_after.length==w.length){
        return true;
      }else{
        return false;
      }
  }
  static boolean check2(String[] w){
    String e = w[0].substring(w[0].length()-1);
    for(int i=1;i<w.length;i++){
      String f = w[i].substring(0,1);
      if(f.equals(e)){
        e = w[i].substring(w[i].length()-1);
      }else{
        return false;
      }
    }
    return true;
  } 
} import java.util.Scanner; Scanner java.util import java.util.LinkedHashSet; LinkedHashSet java.util import java.util.Set; Set java.util public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String[] w = new String[n];
    for(int i=0;i<n;i++){
      w[i]=sc.next();
    }
     if(check1(w) && check2(w)){
       System.out.println("Yes");
     }else{
       System.out.println("No");
     }
  }    
  static boolean check1(String[] w){
      Set<String> linkedHashSet = new LinkedHashSet<String>();
      for (int i=0;i<w.length;i++) {
       linkedHashSet.add(w[i]);
      }
      Object[] w_after = linkedHashSet.toArray();
      if(w_after.length==w.length){
        return true;
      }else{
        return false;
      }
  }
  static boolean check2(String[] w){
    String e = w[0].substring(w[0].length()-1);
    for(int i=1;i<w.length;i++){
      String f = w[i].substring(0,1);
      if(f.equals(e)){
        e = w[i].substring(w[i].length()-1);
      }else{
        return false;
      }
    }
    return true;
  } 
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String[] w = new String[n];
    for(int i=0;i<n;i++){
      w[i]=sc.next();
    }
     if(check1(w) && check2(w)){
       System.out.println("Yes");
     }else{
       System.out.println("No");
     }
  } main {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String[] w = new String[n];
    for(int i=0;i<n;i++){
      w[i]=sc.next();
    }
     if(check1(w) && check2(w)){
       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 String[] w = new String[n]; w new String[n] n for(int i=0;i<n;i++){
      w[i]=sc.next();
    } int i=0; int i=0; i 0 i<n i n i++ i++ i {
      w[i]=sc.next();
    } {
      w[i]=sc.next();
    } w[i]=sc.next() w[i] w i sc.next() sc.next sc if(check1(w) && check2(w)){
       System.out.println("Yes");
     }else{
       System.out.println("No");
     } check1(w) && check2(w) check1(w) check1 w check2(w) check2 w {
       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 static boolean check1(String[] w){
      Set<String> linkedHashSet = new LinkedHashSet<String>();
      for (int i=0;i<w.length;i++) {
       linkedHashSet.add(w[i]);
      }
      Object[] w_after = linkedHashSet.toArray();
      if(w_after.length==w.length){
        return true;
      }else{
        return false;
      }
  } check1 {
      Set<String> linkedHashSet = new LinkedHashSet<String>();
      for (int i=0;i<w.length;i++) {
       linkedHashSet.add(w[i]);
      }
      Object[] w_after = linkedHashSet.toArray();
      if(w_after.length==w.length){
        return true;
      }else{
        return false;
      }
  } Set<String> linkedHashSet = new LinkedHashSet<String>(); linkedHashSet new LinkedHashSet<String>() for (int i=0;i<w.length;i++) {
       linkedHashSet.add(w[i]);
      } int i=0; int i=0; i 0 i<w.length i w.length w w.length i++ i++ i {
       linkedHashSet.add(w[i]);
      } {
       linkedHashSet.add(w[i]);
      } linkedHashSet.add(w[i]) linkedHashSet.add linkedHashSet w[i] w i Object[] w_after = linkedHashSet.toArray(); w_after linkedHashSet.toArray() linkedHashSet.toArray linkedHashSet if(w_after.length==w.length){
        return true;
      }else{
        return false;
      } w_after.length==w.length w_after.length w_after w_after.length w.length w w.length {
        return true;
      } return true; true {
        return false;
      } return false; false String[] w w static boolean check2(String[] w){
    String e = w[0].substring(w[0].length()-1);
    for(int i=1;i<w.length;i++){
      String f = w[i].substring(0,1);
      if(f.equals(e)){
        e = w[i].substring(w[i].length()-1);
      }else{
        return false;
      }
    }
    return true;
  } check2 {
    String e = w[0].substring(w[0].length()-1);
    for(int i=1;i<w.length;i++){
      String f = w[i].substring(0,1);
      if(f.equals(e)){
        e = w[i].substring(w[i].length()-1);
      }else{
        return false;
      }
    }
    return true;
  } String e = w[0].substring(w[0].length()-1); e w[0].substring(w[0].length()-1) w[0].substring w[0] w 0 w[0].length()-1 w[0].length() w[0].length w[0] w 0 1 for(int i=1;i<w.length;i++){
      String f = w[i].substring(0,1);
      if(f.equals(e)){
        e = w[i].substring(w[i].length()-1);
      }else{
        return false;
      }
    } int i=1; int i=1; i 1 i<w.length i w.length w w.length i++ i++ i {
      String f = w[i].substring(0,1);
      if(f.equals(e)){
        e = w[i].substring(w[i].length()-1);
      }else{
        return false;
      }
    } {
      String f = w[i].substring(0,1);
      if(f.equals(e)){
        e = w[i].substring(w[i].length()-1);
      }else{
        return false;
      }
    } String f = w[i].substring(0,1); f w[i].substring(0,1) w[i].substring w[i] w i 0 1 if(f.equals(e)){
        e = w[i].substring(w[i].length()-1);
      }else{
        return false;
      } f.equals(e) f.equals f e {
        e = w[i].substring(w[i].length()-1);
      } e = w[i].substring(w[i].length()-1) e w[i].substring(w[i].length()-1) w[i].substring w[i] w i w[i].length()-1 w[i].length() w[i].length w[i] w i 1 {
        return false;
      } return false; false return true; true String[] w w public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String[] w = new String[n];
    for(int i=0;i<n;i++){
      w[i]=sc.next();
    }
     if(check1(w) && check2(w)){
       System.out.println("Yes");
     }else{
       System.out.println("No");
     }
  }    
  static boolean check1(String[] w){
      Set<String> linkedHashSet = new LinkedHashSet<String>();
      for (int i=0;i<w.length;i++) {
       linkedHashSet.add(w[i]);
      }
      Object[] w_after = linkedHashSet.toArray();
      if(w_after.length==w.length){
        return true;
      }else{
        return false;
      }
  }
  static boolean check2(String[] w){
    String e = w[0].substring(w[0].length()-1);
    for(int i=1;i<w.length;i++){
      String f = w[i].substring(0,1);
      if(f.equals(e)){
        e = w[i].substring(w[i].length()-1);
      }else{
        return false;
      }
    }
    return true;
  } 
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String[] w = new String[n];
    for(int i=0;i<n;i++){
      w[i]=sc.next();
    }
     if(check1(w) && check2(w)){
       System.out.println("Yes");
     }else{
       System.out.println("No");
     }
  }    
  static boolean check1(String[] w){
      Set<String> linkedHashSet = new LinkedHashSet<String>();
      for (int i=0;i<w.length;i++) {
       linkedHashSet.add(w[i]);
      }
      Object[] w_after = linkedHashSet.toArray();
      if(w_after.length==w.length){
        return true;
      }else{
        return false;
      }
  }
  static boolean check2(String[] w){
    String e = w[0].substring(w[0].length()-1);
    for(int i=1;i<w.length;i++){
      String f = w[i].substring(0,1);
      if(f.equals(e)){
        e = w[i].substring(w[i].length()-1);
      }else{
        return false;
      }
    }
    return true;
  } 
} Main
import java.util.Scanner;
import java.util.LinkedHashSet;
import java.util.Set;
public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String[] w = new String[n];
    for(int i=0;i<n;i++){
      w[i]=sc.next();
    }
     if(check1(w) && check2(w)){
       System.out.println("Yes");
     }else{
       System.out.println("No");
     }
  }    
  static boolean check1(String[] w){
      Set<String> linkedHashSet = new LinkedHashSet<String>();
      for (int i=0;i<w.length;i++) {
       linkedHashSet.add(w[i]);
      }
      Object[] w_after = linkedHashSet.toArray();
      if(w_after.length==w.length){
        return true;
      }else{
        return false;
      }
  }
  static boolean check2(String[] w){
    String e = w[0].substring(w[0].length()-1);
    for(int i=1;i<w.length;i++){
      String f = w[i].substring(0,1);
      if(f.equals(e)){
        e = w[i].substring(w[i].length()-1);
      }else{
        return false;
      }
    }
    return true;
  } 
}