import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);

    int N = Integer.parseInt(sc.nextLine());
    String[] W = new String[N];
    for (int i=0; i<N; i++) {
      W[i] = sc.nextLine();
    }


    for (int i=1; i<N; i++) {
      for (int j=0; j<i; j++) {
        if (W[i].equals(W[j])) {
          System.out.println("No");
          return;
        }
      }

      char lastChar = W[i-1].charAt(W[i-1].length()-1);
      if (!W[i].startsWith(String.valueOf(lastChar))) {
        System.out.println("No");
        return;
      }
    }

    System.out.println("Yes");

  }
} import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);

    int N = Integer.parseInt(sc.nextLine());
    String[] W = new String[N];
    for (int i=0; i<N; i++) {
      W[i] = sc.nextLine();
    }


    for (int i=1; i<N; i++) {
      for (int j=0; j<i; j++) {
        if (W[i].equals(W[j])) {
          System.out.println("No");
          return;
        }
      }

      char lastChar = W[i-1].charAt(W[i-1].length()-1);
      if (!W[i].startsWith(String.valueOf(lastChar))) {
        System.out.println("No");
        return;
      }
    }

    System.out.println("Yes");

  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);

    int N = Integer.parseInt(sc.nextLine());
    String[] W = new String[N];
    for (int i=0; i<N; i++) {
      W[i] = sc.nextLine();
    }


    for (int i=1; i<N; i++) {
      for (int j=0; j<i; j++) {
        if (W[i].equals(W[j])) {
          System.out.println("No");
          return;
        }
      }

      char lastChar = W[i-1].charAt(W[i-1].length()-1);
      if (!W[i].startsWith(String.valueOf(lastChar))) {
        System.out.println("No");
        return;
      }
    }

    System.out.println("Yes");

  } main {
    Scanner sc = new Scanner(System.in);

    int N = Integer.parseInt(sc.nextLine());
    String[] W = new String[N];
    for (int i=0; i<N; i++) {
      W[i] = sc.nextLine();
    }


    for (int i=1; i<N; i++) {
      for (int j=0; j<i; j++) {
        if (W[i].equals(W[j])) {
          System.out.println("No");
          return;
        }
      }

      char lastChar = W[i-1].charAt(W[i-1].length()-1);
      if (!W[i].startsWith(String.valueOf(lastChar))) {
        System.out.println("No");
        return;
      }
    }

    System.out.println("Yes");

  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = Integer.parseInt(sc.nextLine()); N Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc String[] W = new String[N]; W new String[N] N for (int i=0; i<N; i++) {
      W[i] = sc.nextLine();
    } int i=0; int i=0; i 0 i<N i N i++ i++ i {
      W[i] = sc.nextLine();
    } {
      W[i] = sc.nextLine();
    } W[i] = sc.nextLine() W[i] W i sc.nextLine() sc.nextLine sc for (int i=1; i<N; i++) {
      for (int j=0; j<i; j++) {
        if (W[i].equals(W[j])) {
          System.out.println("No");
          return;
        }
      }

      char lastChar = W[i-1].charAt(W[i-1].length()-1);
      if (!W[i].startsWith(String.valueOf(lastChar))) {
        System.out.println("No");
        return;
      }
    } int i=1; int i=1; i 1 i<N i N i++ i++ i {
      for (int j=0; j<i; j++) {
        if (W[i].equals(W[j])) {
          System.out.println("No");
          return;
        }
      }

      char lastChar = W[i-1].charAt(W[i-1].length()-1);
      if (!W[i].startsWith(String.valueOf(lastChar))) {
        System.out.println("No");
        return;
      }
    } {
      for (int j=0; j<i; j++) {
        if (W[i].equals(W[j])) {
          System.out.println("No");
          return;
        }
      }

      char lastChar = W[i-1].charAt(W[i-1].length()-1);
      if (!W[i].startsWith(String.valueOf(lastChar))) {
        System.out.println("No");
        return;
      }
    } for (int j=0; j<i; j++) {
        if (W[i].equals(W[j])) {
          System.out.println("No");
          return;
        }
      } int j=0; int j=0; j 0 j<i j i j++ j++ j {
        if (W[i].equals(W[j])) {
          System.out.println("No");
          return;
        }
      } {
        if (W[i].equals(W[j])) {
          System.out.println("No");
          return;
        }
      } if (W[i].equals(W[j])) {
          System.out.println("No");
          return;
        } W[i].equals(W[j]) W[i].equals W[i] W i W[j] W j {
          System.out.println("No");
          return;
        } System.out.println("No") System.out.println System.out System System.out "No" return; char lastChar = W[i-1].charAt(W[i-1].length()-1); lastChar W[i-1].charAt(W[i-1].length()-1) W[i-1].charAt W[i-1] W i-1 i 1 W[i-1].length()-1 W[i-1].length() W[i-1].length W[i-1] W i-1 i 1 1 if (!W[i].startsWith(String.valueOf(lastChar))) {
        System.out.println("No");
        return;
      } !W[i].startsWith(String.valueOf(lastChar)) W[i].startsWith(String.valueOf(lastChar)) W[i].startsWith W[i] W i String.valueOf(lastChar) String.valueOf String lastChar {
        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 = Integer.parseInt(sc.nextLine());
    String[] W = new String[N];
    for (int i=0; i<N; i++) {
      W[i] = sc.nextLine();
    }


    for (int i=1; i<N; i++) {
      for (int j=0; j<i; j++) {
        if (W[i].equals(W[j])) {
          System.out.println("No");
          return;
        }
      }

      char lastChar = W[i-1].charAt(W[i-1].length()-1);
      if (!W[i].startsWith(String.valueOf(lastChar))) {
        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 = Integer.parseInt(sc.nextLine());
    String[] W = new String[N];
    for (int i=0; i<N; i++) {
      W[i] = sc.nextLine();
    }


    for (int i=1; i<N; i++) {
      for (int j=0; j<i; j++) {
        if (W[i].equals(W[j])) {
          System.out.println("No");
          return;
        }
      }

      char lastChar = W[i-1].charAt(W[i-1].length()-1);
      if (!W[i].startsWith(String.valueOf(lastChar))) {
        System.out.println("No");
        return;
      }
    }

    System.out.println("Yes");

  }
} Main
import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);

    int N = Integer.parseInt(sc.nextLine());
    String[] W = new String[N];
    for (int i=0; i<N; i++) {
      W[i] = sc.nextLine();
    }


    for (int i=1; i<N; i++) {
      for (int j=0; j<i; j++) {
        if (W[i].equals(W[j])) {
          System.out.println("No");
          return;
        }
      }

      char lastChar = W[i-1].charAt(W[i-1].length()-1);
      if (!W[i].startsWith(String.valueOf(lastChar))) {
        System.out.println("No");
        return;
      }
    }

    System.out.println("Yes");

  }
}