import java.io.*;
import java.util.*;

public class Main{
  public static void main(String[] args){
    try {
      Scanner sc = new Scanner(System.in);
      int n;
      n=Integer.parseInt(sc.next());
      String[] w=new String[n];
      for(int i=0; i<n; i++){
        w[i]=sc.next();
      }

      boolean ans=true;
      out: for(int i=1; i<n; i++){
        if(w[i].charAt(0)!=w[i-1].charAt(w[i-1].length()-1)){
          ans=false;
          break out;
        }
        for(int j=0; j<i; j++){
          if(w[i].equals(w[j])){
            ans=false;
            break out;
          }
        }
      }

      if(ans==true){
        System.out.println("Yes");
      }else{
        System.out.println("No");
      }
      

      }catch (Exception e) {
      System.out.println("out");
    }
  }
} import java.io.*; io.* java import java.util.*; util.* java public class Main{
  public static void main(String[] args){
    try {
      Scanner sc = new Scanner(System.in);
      int n;
      n=Integer.parseInt(sc.next());
      String[] w=new String[n];
      for(int i=0; i<n; i++){
        w[i]=sc.next();
      }

      boolean ans=true;
      out: for(int i=1; i<n; i++){
        if(w[i].charAt(0)!=w[i-1].charAt(w[i-1].length()-1)){
          ans=false;
          break out;
        }
        for(int j=0; j<i; j++){
          if(w[i].equals(w[j])){
            ans=false;
            break out;
          }
        }
      }

      if(ans==true){
        System.out.println("Yes");
      }else{
        System.out.println("No");
      }
      

      }catch (Exception e) {
      System.out.println("out");
    }
  }
} Main public static void main(String[] args){
    try {
      Scanner sc = new Scanner(System.in);
      int n;
      n=Integer.parseInt(sc.next());
      String[] w=new String[n];
      for(int i=0; i<n; i++){
        w[i]=sc.next();
      }

      boolean ans=true;
      out: for(int i=1; i<n; i++){
        if(w[i].charAt(0)!=w[i-1].charAt(w[i-1].length()-1)){
          ans=false;
          break out;
        }
        for(int j=0; j<i; j++){
          if(w[i].equals(w[j])){
            ans=false;
            break out;
          }
        }
      }

      if(ans==true){
        System.out.println("Yes");
      }else{
        System.out.println("No");
      }
      

      }catch (Exception e) {
      System.out.println("out");
    }
  } main {
    try {
      Scanner sc = new Scanner(System.in);
      int n;
      n=Integer.parseInt(sc.next());
      String[] w=new String[n];
      for(int i=0; i<n; i++){
        w[i]=sc.next();
      }

      boolean ans=true;
      out: for(int i=1; i<n; i++){
        if(w[i].charAt(0)!=w[i-1].charAt(w[i-1].length()-1)){
          ans=false;
          break out;
        }
        for(int j=0; j<i; j++){
          if(w[i].equals(w[j])){
            ans=false;
            break out;
          }
        }
      }

      if(ans==true){
        System.out.println("Yes");
      }else{
        System.out.println("No");
      }
      

      }catch (Exception e) {
      System.out.println("out");
    }
  } try {
      Scanner sc = new Scanner(System.in);
      int n;
      n=Integer.parseInt(sc.next());
      String[] w=new String[n];
      for(int i=0; i<n; i++){
        w[i]=sc.next();
      }

      boolean ans=true;
      out: for(int i=1; i<n; i++){
        if(w[i].charAt(0)!=w[i-1].charAt(w[i-1].length()-1)){
          ans=false;
          break out;
        }
        for(int j=0; j<i; j++){
          if(w[i].equals(w[j])){
            ans=false;
            break out;
          }
        }
      }

      if(ans==true){
        System.out.println("Yes");
      }else{
        System.out.println("No");
      }
      

      }catch (Exception e) {
      System.out.println("out");
    } catch (Exception e) {
      System.out.println("out");
    } Exception e {
      System.out.println("out");
    } System.out.println("out") System.out.println System.out System System.out "out" {
      Scanner sc = new Scanner(System.in);
      int n;
      n=Integer.parseInt(sc.next());
      String[] w=new String[n];
      for(int i=0; i<n; i++){
        w[i]=sc.next();
      }

      boolean ans=true;
      out: for(int i=1; i<n; i++){
        if(w[i].charAt(0)!=w[i-1].charAt(w[i-1].length()-1)){
          ans=false;
          break out;
        }
        for(int j=0; j<i; j++){
          if(w[i].equals(w[j])){
            ans=false;
            break out;
          }
        }
      }

      if(ans==true){
        System.out.println("Yes");
      }else{
        System.out.println("No");
      }
      

      } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n; n n=Integer.parseInt(sc.next()) n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next 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 boolean ans=true; ans true if(ans==true){
        System.out.println("Yes");
      }else{
        System.out.println("No");
      } ans==true ans true {
        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 public class Main{
  public static void main(String[] args){
    try {
      Scanner sc = new Scanner(System.in);
      int n;
      n=Integer.parseInt(sc.next());
      String[] w=new String[n];
      for(int i=0; i<n; i++){
        w[i]=sc.next();
      }

      boolean ans=true;
      out: for(int i=1; i<n; i++){
        if(w[i].charAt(0)!=w[i-1].charAt(w[i-1].length()-1)){
          ans=false;
          break out;
        }
        for(int j=0; j<i; j++){
          if(w[i].equals(w[j])){
            ans=false;
            break out;
          }
        }
      }

      if(ans==true){
        System.out.println("Yes");
      }else{
        System.out.println("No");
      }
      

      }catch (Exception e) {
      System.out.println("out");
    }
  }
} public class Main{
  public static void main(String[] args){
    try {
      Scanner sc = new Scanner(System.in);
      int n;
      n=Integer.parseInt(sc.next());
      String[] w=new String[n];
      for(int i=0; i<n; i++){
        w[i]=sc.next();
      }

      boolean ans=true;
      out: for(int i=1; i<n; i++){
        if(w[i].charAt(0)!=w[i-1].charAt(w[i-1].length()-1)){
          ans=false;
          break out;
        }
        for(int j=0; j<i; j++){
          if(w[i].equals(w[j])){
            ans=false;
            break out;
          }
        }
      }

      if(ans==true){
        System.out.println("Yes");
      }else{
        System.out.println("No");
      }
      

      }catch (Exception e) {
      System.out.println("out");
    }
  }
} Main
import java.io.*;
import java.util.*;

public class Main{
  public static void main(String[] args){
    try {
      Scanner sc = new Scanner(System.in);
      int n;
      n=Integer.parseInt(sc.next());
      String[] w=new String[n];
      for(int i=0; i<n; i++){
        w[i]=sc.next();
      }

      boolean ans=true;
      out: for(int i=1; i<n; i++){
        if(w[i].charAt(0)!=w[i-1].charAt(w[i-1].length()-1)){
          ans=false;
          break out;
        }
        for(int j=0; j<i; j++){
          if(w[i].equals(w[j])){
            ans=false;
            break out;
          }
        }
      }

      if(ans==true){
        System.out.println("Yes");
      }else{
        System.out.println("No");
      }
      

      }catch (Exception e) {
      System.out.println("out");
    }
  }
}
