import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    String[] w = new String[n];
    w[0] = in.readLine();
    boolean flg = true;
    for(int i=1; i<n; i++) {
      w[i] = in.readLine();
      if(!w[i-1].substring(w[i-1].length()-1,w[i-1].length()).equals(w[i].substring(0,1))){
        flg = false;
        break;
      }
      for(int j=0; j<i; j++) {
        if(w[i].equals(w[j])){
          flg = false;
          break;
        }
      }
    }
    System.out.println(flg==true?"Yes":"No");
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.IOException; IOException java.io public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    String[] w = new String[n];
    w[0] = in.readLine();
    boolean flg = true;
    for(int i=1; i<n; i++) {
      w[i] = in.readLine();
      if(!w[i-1].substring(w[i-1].length()-1,w[i-1].length()).equals(w[i].substring(0,1))){
        flg = false;
        break;
      }
      for(int j=0; j<i; j++) {
        if(w[i].equals(w[j])){
          flg = false;
          break;
        }
      }
    }
    System.out.println(flg==true?"Yes":"No");
  }
} Main public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    String[] w = new String[n];
    w[0] = in.readLine();
    boolean flg = true;
    for(int i=1; i<n; i++) {
      w[i] = in.readLine();
      if(!w[i-1].substring(w[i-1].length()-1,w[i-1].length()).equals(w[i].substring(0,1))){
        flg = false;
        break;
      }
      for(int j=0; j<i; j++) {
        if(w[i].equals(w[j])){
          flg = false;
          break;
        }
      }
    }
    System.out.println(flg==true?"Yes":"No");
  } main {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    String[] w = new String[n];
    w[0] = in.readLine();
    boolean flg = true;
    for(int i=1; i<n; i++) {
      w[i] = in.readLine();
      if(!w[i-1].substring(w[i-1].length()-1,w[i-1].length()).equals(w[i].substring(0,1))){
        flg = false;
        break;
      }
      for(int j=0; j<i; j++) {
        if(w[i].equals(w[j])){
          flg = false;
          break;
        }
      }
    }
    System.out.println(flg==true?"Yes":"No");
  } BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) int n = Integer.parseInt(in.readLine()); n Integer.parseInt(in.readLine()) Integer.parseInt Integer in.readLine() in.readLine in String[] w = new String[n]; w new String[n] n w[0] = in.readLine() w[0] w 0 in.readLine() in.readLine in boolean flg = true; flg true for(int i=1; i<n; i++) {
      w[i] = in.readLine();
      if(!w[i-1].substring(w[i-1].length()-1,w[i-1].length()).equals(w[i].substring(0,1))){
        flg = false;
        break;
      }
      for(int j=0; j<i; j++) {
        if(w[i].equals(w[j])){
          flg = false;
          break;
        }
      }
    } int i=1; int i=1; i 1 i<n i n i++ i++ i {
      w[i] = in.readLine();
      if(!w[i-1].substring(w[i-1].length()-1,w[i-1].length()).equals(w[i].substring(0,1))){
        flg = false;
        break;
      }
      for(int j=0; j<i; j++) {
        if(w[i].equals(w[j])){
          flg = false;
          break;
        }
      }
    } {
      w[i] = in.readLine();
      if(!w[i-1].substring(w[i-1].length()-1,w[i-1].length()).equals(w[i].substring(0,1))){
        flg = false;
        break;
      }
      for(int j=0; j<i; j++) {
        if(w[i].equals(w[j])){
          flg = false;
          break;
        }
      }
    } w[i] = in.readLine() w[i] w i in.readLine() in.readLine in if(!w[i-1].substring(w[i-1].length()-1,w[i-1].length()).equals(w[i].substring(0,1))){
        flg = false;
        break;
      } !w[i-1].substring(w[i-1].length()-1,w[i-1].length()).equals(w[i].substring(0,1)) w[i-1].substring(w[i-1].length()-1,w[i-1].length()).equals(w[i].substring(0,1)) w[i-1].substring(w[i-1].length()-1,w[i-1].length()).equals w[i-1].substring(w[i-1].length()-1,w[i-1].length()) w[i-1].substring 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 w[i-1].length() w[i-1].length w[i-1] w i-1 i 1 w[i].substring(0,1) w[i].substring w[i] w i 0 1 {
        flg = false;
        break;
      } flg = false flg false break; for(int j=0; j<i; j++) {
        if(w[i].equals(w[j])){
          flg = false;
          break;
        }
      } int j=0; int j=0; j 0 j<i j i j++ j++ j {
        if(w[i].equals(w[j])){
          flg = false;
          break;
        }
      } {
        if(w[i].equals(w[j])){
          flg = false;
          break;
        }
      } if(w[i].equals(w[j])){
          flg = false;
          break;
        } w[i].equals(w[j]) w[i].equals w[i] w i w[j] w j {
          flg = false;
          break;
        } flg = false flg false break; System.out.println(flg==true?"Yes":"No") System.out.println System.out System System.out flg==true?"Yes":"No" flg==true flg true "Yes" "No" String[] args args public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    String[] w = new String[n];
    w[0] = in.readLine();
    boolean flg = true;
    for(int i=1; i<n; i++) {
      w[i] = in.readLine();
      if(!w[i-1].substring(w[i-1].length()-1,w[i-1].length()).equals(w[i].substring(0,1))){
        flg = false;
        break;
      }
      for(int j=0; j<i; j++) {
        if(w[i].equals(w[j])){
          flg = false;
          break;
        }
      }
    }
    System.out.println(flg==true?"Yes":"No");
  }
} public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    String[] w = new String[n];
    w[0] = in.readLine();
    boolean flg = true;
    for(int i=1; i<n; i++) {
      w[i] = in.readLine();
      if(!w[i-1].substring(w[i-1].length()-1,w[i-1].length()).equals(w[i].substring(0,1))){
        flg = false;
        break;
      }
      for(int j=0; j<i; j++) {
        if(w[i].equals(w[j])){
          flg = false;
          break;
        }
      }
    }
    System.out.println(flg==true?"Yes":"No");
  }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    String[] w = new String[n];
    w[0] = in.readLine();
    boolean flg = true;
    for(int i=1; i<n; i++) {
      w[i] = in.readLine();
      if(!w[i-1].substring(w[i-1].length()-1,w[i-1].length()).equals(w[i].substring(0,1))){
        flg = false;
        break;
      }
      for(int j=0; j<i; j++) {
        if(w[i].equals(w[j])){
          flg = false;
          break;
        }
      }
    }
    System.out.println(flg==true?"Yes":"No");
  }
}