#include <bits/stdc++.h>
using namespace std;
char s[100005], ss[100005], sss[100005], str[10];
int main() {
  int n, ls = 0;
  scanf("%d", &n);
  str[0] = '<', str[1] = '3', str[2] = '\0';
  for (int i = 0; i < n; i++) {
    sss[ls++] = '<', sss[ls++] = '3';
    scanf("%s", s);
    for (int j = 0; s[j]; j++) sss[ls++] = s[j];
  }
  sss[ls++] = '<', sss[ls++] = '3', sss[ls] = '\0';
  scanf("%s", ss);
  int j = 0;
  int siz = strlen(sss), ok = 0;
  for (int i = 0; ss[i]; i++) {
    if (ss[i] == sss[j]) j++;
    if (j == siz) {
      ok = 1;
      break;
    }
  }
  if (ok)
    puts("yes");
  else
    puts("no");
  return 0;
}
