#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string demo = "<3";
  while (n--) {
    string s;
    cin >> s;
    demo += s + "<3";
  }
  string encrip;
  cin >> encrip;
  int cnt = 0;
  for (int i = 0; i < encrip.size(); i++) {
    if (demo[cnt] == encrip[i]) cnt++;
  }
  if (cnt == demo.size()) {
    printf("yes\n");
  } else {
    printf("no\n");
  }
  return 0;
}
