#include <bits/stdc++.h>
using namespace std;
string str, word, code;
int main() {
  int n, i;
  scanf("%d", &n);
  str = "<3";
  for (i = 0; i < n; i++) {
    cin >> word;
    str += word;
    str += "<3";
  }
  cin >> code;
  unsigned int c, s, lenc, lens;
  lenc = code.length();
  lens = str.length();
  for (s = 0, c = 0; c < lenc; c++) {
    if (code[c] == str[s]) s++;
    if (s == lens) break;
  }
  if (s == lens)
    printf("yes\n");
  else
    printf("no\n");
  return 0;
}
