#include <bits/stdc++.h>
int main() {
  int n, i, l, j, p, k;
  char s[100001], c, msg[1000000];
  char *mat[100001];
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%s", s);
    mat[i] = (char *)malloc(sizeof(char) * (strlen(s) + 1));
    strcpy(mat[i], s);
  }
  scanf("%s", msg);
  l = strlen(msg);
  j = 0;
  for (i = 0; i < n; i++) {
    while (j < l && msg[j] != '<') j++;
    if (j < l) {
      j++;
      while (j < l && msg[j] != '3') j++;
      if (j < l) {
        p = strlen(mat[i]);
        for (k = 0; ((k < p) && (j < l)); k++) {
          j++;
          c = mat[i][k];
          while (j < l && msg[j] != c) j++;
        }
        if (j >= l) {
          printf("no\n");
          return 0;
        }
        j++;
      }
    }
  }
  while (j < l && msg[j] != '<') j++;
  if (j < l) {
    j++;
    while (j < l && msg[j] != '3') j++;
  }
  if (j < l && msg[j] == '3')
    printf("yes\n");
  else
    printf("no\n");
  return 0;
}
