#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1 << 20;
int n;
char a[MAXN];
char b[MAXN];
int main() {
  scanf("%d", &n);
  char* cur = a;
  *cur++ = '<';
  *cur++ = '3';
  for (int i = 0; i < n; i++) {
    scanf("%s", cur);
    while (*++cur)
      ;
    *cur++ = '<';
    *cur++ = '3';
  }
  *cur = 0;
  scanf("%s", b);
  char *ac = a, *bc = b;
  while (*ac) {
    while (*bc && *bc != *ac) bc++;
    if (*bc == *ac)
      bc++;
    else
      return puts("no"), 0;
    ac++;
  }
  puts("yes");
}
