#include <bits/stdc++.h>
using namespace std;
map<string, int> mymap;
int main() {
  long int len, i, cnt = 0, n, k = 0;
  string s2 = "", str;
  char str2[100009];
  scanf("%ld", &n);
  for (i = 0; i < n; i++) {
    s2 += "<3";
    cin >> str;
    s2 += str;
  }
  s2 += "<3";
  scanf("%s", str2);
  len = strlen(str2);
  for (i = 0; i < len; i++)
    if (str2[i] == s2[k]) k++;
  if (k == s2.size())
    printf("yes\n");
  else
    printf("no\n");
  return 0;
}
