#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j;
  string str, li = "<3";
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> str;
    li += str;
    li += "<3";
  }
  cin >> str;
  for (i = 0, j = 0; i < li.length() && j < str.length(); j++) {
    if (li[i] == str[j]) {
      i++;
    }
  }
  if (i == li.length())
    cout << "yes" << endl;
  else
    cout << "no" << endl;
  return 0;
}
