#include <bits/stdc++.h>
using namespace std;
int n, f, sec, cnt;
char s3[100005], s2[100005];
string s, s4;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%s", &s3);
    s = s + "<3" + s3 + "%";
    cnt++;
  }
  s = s + "<3";
  scanf("%s", &s2);
  s4 = s2;
  f = 0;
  sec = 0;
  int l1 = s.size();
  int l2 = s4.size();
  while ((l1 > f) && (l2 > sec)) {
    if (s[f] == s4[sec]) {
      f++;
      sec++;
    } else if (s[f] == '%') {
      f++;
      cnt--;
    } else
      sec++;
  }
  if ((cnt == 0) && (f == l1))
    printf("yes");
  else
    printf("no");
  return 0;
}
