import java.util.*;

class Main{
  public static void main(String args[]){
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    String[] a = new String[n];
    boolean flag = true;
    for(int i = 0;i < n;i++){
      a[i] = scan.next();
    }
    for(int i = 0;i < n;i++){
      if(i == 0){
        continue;
      }
      if(a[i].charAt(0) != a[i-1].charAt(a[i-1].length()-1)){
        flag = false;
        break;
      }
      for(int j = 0;j < i;j++){
        if(a[i].equals(a[j])){
          flag = false;
          break;
        }
      }
      if(flag == false){
        break;
      }
    }

    if(flag){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
  }
} import java.util.*; util.* java class Main{
  public static void main(String args[]){
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    String[] a = new String[n];
    boolean flag = true;
    for(int i = 0;i < n;i++){
      a[i] = scan.next();
    }
    for(int i = 0;i < n;i++){
      if(i == 0){
        continue;
      }
      if(a[i].charAt(0) != a[i-1].charAt(a[i-1].length()-1)){
        flag = false;
        break;
      }
      for(int j = 0;j < i;j++){
        if(a[i].equals(a[j])){
          flag = false;
          break;
        }
      }
      if(flag == false){
        break;
      }
    }

    if(flag){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
  }
} Main public static void main(String args[]){
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    String[] a = new String[n];
    boolean flag = true;
    for(int i = 0;i < n;i++){
      a[i] = scan.next();
    }
    for(int i = 0;i < n;i++){
      if(i == 0){
        continue;
      }
      if(a[i].charAt(0) != a[i-1].charAt(a[i-1].length()-1)){
        flag = false;
        break;
      }
      for(int j = 0;j < i;j++){
        if(a[i].equals(a[j])){
          flag = false;
          break;
        }
      }
      if(flag == false){
        break;
      }
    }

    if(flag){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
  } main {
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    String[] a = new String[n];
    boolean flag = true;
    for(int i = 0;i < n;i++){
      a[i] = scan.next();
    }
    for(int i = 0;i < n;i++){
      if(i == 0){
        continue;
      }
      if(a[i].charAt(0) != a[i-1].charAt(a[i-1].length()-1)){
        flag = false;
        break;
      }
      for(int j = 0;j < i;j++){
        if(a[i].equals(a[j])){
          flag = false;
          break;
        }
      }
      if(flag == false){
        break;
      }
    }

    if(flag){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
  } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan String[] a = new String[n]; a new String[n] n boolean flag = true; flag true for(int i = 0;i < n;i++){
      a[i] = scan.next();
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      a[i] = scan.next();
    } {
      a[i] = scan.next();
    } a[i] = scan.next() a[i] a i scan.next() scan.next scan for(int i = 0;i < n;i++){
      if(i == 0){
        continue;
      }
      if(a[i].charAt(0) != a[i-1].charAt(a[i-1].length()-1)){
        flag = false;
        break;
      }
      for(int j = 0;j < i;j++){
        if(a[i].equals(a[j])){
          flag = false;
          break;
        }
      }
      if(flag == false){
        break;
      }
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      if(i == 0){
        continue;
      }
      if(a[i].charAt(0) != a[i-1].charAt(a[i-1].length()-1)){
        flag = false;
        break;
      }
      for(int j = 0;j < i;j++){
        if(a[i].equals(a[j])){
          flag = false;
          break;
        }
      }
      if(flag == false){
        break;
      }
    } {
      if(i == 0){
        continue;
      }
      if(a[i].charAt(0) != a[i-1].charAt(a[i-1].length()-1)){
        flag = false;
        break;
      }
      for(int j = 0;j < i;j++){
        if(a[i].equals(a[j])){
          flag = false;
          break;
        }
      }
      if(flag == false){
        break;
      }
    } if(i == 0){
        continue;
      } i == 0 i 0 {
        continue;
      } continue; if(a[i].charAt(0) != a[i-1].charAt(a[i-1].length()-1)){
        flag = false;
        break;
      } a[i].charAt(0) != a[i-1].charAt(a[i-1].length()-1) a[i].charAt(0) a[i].charAt a[i] a i 0 a[i-1].charAt(a[i-1].length()-1) a[i-1].charAt a[i-1] a i-1 i 1 a[i-1].length()-1 a[i-1].length() a[i-1].length a[i-1] a i-1 i 1 1 {
        flag = false;
        break;
      } flag = false flag false break; for(int j = 0;j < i;j++){
        if(a[i].equals(a[j])){
          flag = false;
          break;
        }
      } int j = 0; int j = 0; j 0 j < i j i j++ j++ j {
        if(a[i].equals(a[j])){
          flag = false;
          break;
        }
      } {
        if(a[i].equals(a[j])){
          flag = false;
          break;
        }
      } if(a[i].equals(a[j])){
          flag = false;
          break;
        } a[i].equals(a[j]) a[i].equals a[i] a i a[j] a j {
          flag = false;
          break;
        } flag = false flag false break; if(flag == false){
        break;
      } flag == false flag false {
        break;
      } break; if(flag){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    } flag {
      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
import java.util.*;

class Main{
  public static void main(String args[]){
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    String[] a = new String[n];
    boolean flag = true;
    for(int i = 0;i < n;i++){
      a[i] = scan.next();
    }
    for(int i = 0;i < n;i++){
      if(i == 0){
        continue;
      }
      if(a[i].charAt(0) != a[i-1].charAt(a[i-1].length()-1)){
        flag = false;
        break;
      }
      for(int j = 0;j < i;j++){
        if(a[i].equals(a[j])){
          flag = false;
          break;
        }
      }
      if(flag == false){
        break;
      }
    }

    if(flag){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
  }
}